#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long vpow(long long a, long long b, long long p) {
  if (b == 0) return 1;
  if (b == 1) return a;
  long long temp = vpow(a, b / 2, p);
  temp *= temp;
  temp %= p;
  if (b % 2 == 0) return temp;
  temp = temp * a;
  temp %= p;
  return temp;
}
long long inverseMod(long long a, long long b, long long p) {
  long long temp = vpow(b, p - 2, p);
  long long ans = temp * a;
  ans %= p;
  return ans;
}
void solve() {
  long long n;
  cin >> n;
  if (n < 4) {
    if (n == 2) cout << 1 << endl;
    if (n == 3) cout << 7 << endl;
    return;
  }
  long long cnt = n / 2;
  n %= 2;
  string s = "";
  for (__typeof((cnt)) i = (0); i < (cnt); i++) s += '1';
  if (n != 0) {
    s[0] = '7';
  }
  cout << s << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  cin >> t;
  cout << fixed << setprecision(12);
  while (t--) solve();
  return 0;
}

### Prompt

Please formulate a Cpp solution to 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;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long vpow(long long a, long long b, long long p) {
  if (b == 0) return 1;
  if (b == 1) return a;
  long long temp = vpow(a, b / 2, p);
  temp *= temp;
  temp %= p;
  if (b % 2 == 0) return temp;
  temp = temp * a;
  temp %= p;
  return temp;
}
long long inverseMod(long long a, long long b, long long p) {
  long long temp = vpow(b, p - 2, p);
  long long ans = temp * a;
  ans %= p;
  return ans;
}
void solve() {
  long long n;
  cin >> n;
  if (n < 4) {
    if (n == 2) cout << 1 << endl;
    if (n == 3) cout << 7 << endl;
    return;
  }
  long long cnt = n / 2;
  n %= 2;
  string s = "";
  for (__typeof((cnt)) i = (0); i < (cnt); i++) s += '1';
  if (n != 0) {
    s[0] = '7';
  }
  cout << s << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  cin >> t;
  cout << fixed << setprecision(12);
  while (t--) solve();
  return 0;
}

```