You have a large electronic screen which can display up to $998244353$ decimal digits. The digits are displayed in the same way as on different electronic alarm clocks: each place for a digit consists of $7$ segments which can be turned on and off to compose different digits. The following picture describes how you can display all $10$ decimal digits:

[Image]

As you can see, different digits may require different number of segments to be turned on. For example, if you want to display $1$, you have to turn on $2$ segments of the screen, and if you want to display $8$, all $7$ segments of some place to display a digit should be turned on.

You want to display a really large integer on the screen. Unfortunately, the screen is bugged: no more than $n$ segments can be turned on simultaneously. So now you wonder what is the greatest integer that can be displayed by turning on no more than $n$ segments.

Your program should be able to process $t$ different test cases.


-----Input-----

The first line contains one integer $t$ ($1 \le t \le 100$) — the number of test cases in the input.

Then the test cases follow, each of them is represented by a separate line containing one integer $n$ ($2 \le n \le 10^5$) — the maximum number of segments that can be turned on in the corresponding testcase.

It is guaranteed that the sum of $n$ over all test cases in the input does not exceed $10^5$.


-----Output-----

For each test case, print the greatest integer that can be displayed by turning on no more than $n$ segments of the screen. Note that the answer may not fit in the standard $32$-bit or $64$-bit integral data type.


-----Example-----
Input
2
3
4

Output
7
11

Starter code:

Solutions:
for _ in range(int(input())):
	n = int(input())
	if(n%2):
		print("7"+"1"*((n-3)//2))
	else:
		print("1"*(n//2))	

t=int(input())
for i in ' '*t:
    n=int(input())
    if n%2==1:print('7'+'1'*((n-3)//2))
    else:print('1'*(n//2))

for _ in range(int(input())):
	n = int(input())

	if n % 2:
		print('7', end = "")
		n -= 3

	while n:
		print('1', end = "")
		n -= 2

	print()

T = int(input())
for kase in range(T):
    n = int(input())
    if n&1:
        print('7'+(n-3)//2*'1')
    else:
        print(n//2*'1')

for _ in range(int(input())):
	n=int(input())
	if n%2==1:
		print("7"+"1"*(n//2-1))
	else:
		print("1"*(n//2))

import sys
input = sys.stdin.readline
def getInt(): return int(input())
def getVars(): return list(map(int, input().split()))
def getList(): return list(map(int, input().split()))
def getStr(): return input().strip()
## -------------------------------
t = getInt()
for _ in range(t):
    n = getInt()
    if n%2 == 1:
        print('7' + '1' * (n//2 - 1))
    else:
        print('1'*(n//2))


for _ in range(int(input())):
    n = int(input())
    if n % 2 == 0:
        print ('1' * (n // 2))
    else:
        print ('7' + '1' * ((n - 3) // 2))

t = int(input())
for i in range(t):
    n = int(input())
    print("7" * (n % 2) + "1" * (n // 2 - (n % 2)))

t = int(input())
for i in range(t):
    n = int(input())
    arr = ''
    if (n % 2 == 1):
        arr = '7'
        for j in range((n - 3) // 2):
            arr += '1'
    else:
        for j in range(n // 2):
            arr += '1'
    print(arr)



import sys
import math
import itertools
import functools
import collections
import operator


def ii(): return int(input())
def mi(): return list(map(int, input().split()))
def li(): return list(map(int, input().split()))
def lcm(a, b): return abs(a * b) // math.gcd(a, b)
def revn(n): return str(n)[::-1]
def dd(): return collections.defaultdict(int)
def ddl(): return collections.defaultdict(list)
def sieve(n):
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r
def divs(n, start=2):
    r = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if (n % i == 0):
            if (n / i == i):
                r.append(i)
            else:
                r.extend([i, n // i])
    return r
def divn(n, primes):
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t
def prime(n):
    if n == 2: return True
    if n % 2 == 0 or n <= 1: return False
    sqr = int(math.sqrt(n)) + 1
    for d in range(3, sqr, 2):
        if n % d == 0: return False
    return True
def convn(number, base):
    newnumber = 0
    while number > 0:
        newnumber += number % base
        number //= base
    return newnumber
def cdiv(n, k): return n // k + (n % k != 0)


t = ii()
for _ in range(t):
    n = ii()
    if n % 2:
        print('7' + '1' * ((n - 3) // 2))
    else:
        print('1' * (n // 2))


t = int(input())
for i in range(t):
    n = int(input())
    s = ''
    if n % 2:
        s = '7'
        n -= 3
    else:
        s = '1'
        n -= 2
    s += '1' * (n // 2)
    print(s)


t=int(input())
for _ in range(t):
    n=int(input())
    if n%2==0:
        print("1"*(n//2))
    else:
        print("7"+"1"*((n-3)//2))
        


t =  int(input())

for _ in range(t):
    n = int(input())
    if (n%2==0):
        print('1'*(n//2))
    else:
        print('7'+'1'*((n-3)//2))

for _ in range(int(input())):
    n=int(input())
    if n%2==0:
        print('1'*(n//2))
    else:
        print('7'+('1'*((n//2)-1)))


t = int(input())

while t:
    t -= 1
    n = int(input())
    if n % 2 == 0:
        print('1' * (n//2))
    else:
        print('7' + '1' * ((n - 3)//2))

t = int(input())
for _ in range(t):
    n = int(input())
    if n % 2 == 0:
        print('1'*(n//2))
    else:
        print('7'+'1'*(n//2-1))


t = int(input())
while t:
    n = int(input())
    o = "1" * (n // 2)
    if n % 2: o = "7" + o[1:]
    print(o)
    t -= 1


n=int(input())
for i in range(n):
    d=int(input())
    if d%2==1:
        e=(d-3)//2
        s='7'+'1'*e
    else:
        e=d//2
        s='1'*e
    print(s)

t = int(input())
for _ in range(t):
    n = int(input())
    if n % 2 == 0:
        print("1"*(n//2))
    else:
        print("7"+"1"*(n//2-1))


t=int(input())
for _ in range(t):
    n=int(input())
    if n%2==0:
        x=n//2
        for i in range(x):
            print(1,end='')
    else:
        x=n//2
        x-=1
        print(7,end='')
        for i in range(x):
            print(1,end='')
    print()

t = int(input())
for y in range(t):
	n = int(input())
	s = ""
	if(n%2 == 1):
		s += '7'
		n -= 3
	s += (n//2)*'1'
	print(int(s))