#include <bits/stdc++.h>
using namespace std;
const string no = "NO", yes = "YES";
const long long inf = 1e18;
const int mod = 1e9 + 7;
const long double pi = acosl(-1.0);
bool isPrime[100005];
long long fact[100005];
bool sbs(const pair<long long, long long>& a,
         const pair<long long, long long> b) {
  return a.second > b.second;
}
void seive() {
  memset(isPrime, true, sizeof(isPrime));
  isPrime[1] = false;
  isPrime[2] = true;
  for (int i = 2; i * i <= 100005; i++) {
    for (int j = i * i; j <= 100005; j += i) {
      isPrime[j] = false;
    }
  }
}
void factorial() {
  fact[0] = fact[1] = 1;
  for (int i = 2; i < 100005; i++)
    fact[i] = (fact[i - 1] % mod * i % mod) % mod;
}
long long factor[200001];
void factorise_sieve() {
  int maxN = 200001;
  for (int i = 1; i <= maxN; i++) factor[i] = i;
  for (int i = 2; i <= maxN; i += 2) factor[i] = 2;
  for (int i = 3; i * i <= maxN; i++) {
    if (factor[i] == i) {
      for (int j = i * i; j < maxN + 1; j += i)
        if (factor[j] == j) factor[j] = i;
    }
  }
}
long long power(long long x, int y, int p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long modInverse(long long n, int p) { return power(n, p - 2, p); }
long long nCrModPFermat(long long n, int r, int p) {
  if (n < r) return 0;
  if (r == 0) return 1;
  long long fac[n + 1];
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = (fac[i - 1] * i) % p;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
void solve() {
  long long n;
  cin >> n;
  string ans = "";
  if (n & 1) ans += '7', n -= 2;
  n /= 2;
  while (n--) ans += '1';
  cout << ans << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  cin >> t;
  while (t--) solve();
}

### Prompt

In cpp, your task is to solve the following problem:

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 ≤ t ≤ 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 ≤ n ≤ 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

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const string no = "NO", yes = "YES";
const long long inf = 1e18;
const int mod = 1e9 + 7;
const long double pi = acosl(-1.0);
bool isPrime[100005];
long long fact[100005];
bool sbs(const pair<long long, long long>& a,
         const pair<long long, long long> b) {
  return a.second > b.second;
}
void seive() {
  memset(isPrime, true, sizeof(isPrime));
  isPrime[1] = false;
  isPrime[2] = true;
  for (int i = 2; i * i <= 100005; i++) {
    for (int j = i * i; j <= 100005; j += i) {
      isPrime[j] = false;
    }
  }
}
void factorial() {
  fact[0] = fact[1] = 1;
  for (int i = 2; i < 100005; i++)
    fact[i] = (fact[i - 1] % mod * i % mod) % mod;
}
long long factor[200001];
void factorise_sieve() {
  int maxN = 200001;
  for (int i = 1; i <= maxN; i++) factor[i] = i;
  for (int i = 2; i <= maxN; i += 2) factor[i] = 2;
  for (int i = 3; i * i <= maxN; i++) {
    if (factor[i] == i) {
      for (int j = i * i; j < maxN + 1; j += i)
        if (factor[j] == j) factor[j] = i;
    }
  }
}
long long power(long long x, int y, int p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long modInverse(long long n, int p) { return power(n, p - 2, p); }
long long nCrModPFermat(long long n, int r, int p) {
  if (n < r) return 0;
  if (r == 0) return 1;
  long long fac[n + 1];
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = (fac[i - 1] * i) % p;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
void solve() {
  long long n;
  cin >> n;
  string ans = "";
  if (n & 1) ans += '7', n -= 2;
  n /= 2;
  while (n--) ans += '1';
  cout << ans << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  cin >> t;
  while (t--) solve();
}

```