TSHOW1 - Amusing numbers

Amusing numbers are numbers consisting only of digits 5 and 6. Given an integer k , display the k-th amusing number.

Input

FIrst line consists of integer N representing number of test cases

Next N lines consist of N integers (1 <= k <= 10^15)

Output

N lines each displaying corresponding k-th amusing number

Example

Input:
2
1
5

Output:
5
65

Added by:Pandian
Date:2012-04-10
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:AOL code contest

hide comments
2017-06-12 13:10:25
Stupid mistake in first submission, AC in second go using bits.
Must try. :)
2017-03-20 09:23:23
AC in one GO! 0.00 sec, bit manipulation is the key!
2017-03-09 15:47:19
little math
2017-03-01 15:43:57
new concept :) yipee AC in one go :)
2017-02-23 15:40:00
AC in one go :))
2017-01-24 15:18:02
AC in one go ! easy one if you get the logic !
2017-01-05 15:49:13 herkeyrefugee
be careful with the input all inputs are taken before the outputting the answer to previous cases
2016-11-03 19:16:43
one click to turn on the green light :)
2016-10-15 21:49:41
NICE ONE...AC in one go .....Enjoyed Solving it....really amusing ...
2016-10-15 21:44:20
AC in one go....use binary representation in tricky way.
NICE ONE ....
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.