#include <bits/stdc++.h>
using namespace std;
void FILE_OP() {}
const int N = 105;
int n;
int rank1[N], parent[N];
vector<int> adj[N];
void make_set(int v) {
  parent[v] = v;
  rank1[v] = 0;
}
long long int find_set(int v) {
  if (v == parent[v])
    return v;
  else
    v = find_set(parent[v]);
}
void union_set(int a, int b) {
  a = find_set(a);
  b = find_set(b);
  if (a != b) {
    if (rank1[a] < rank1[b]) swap(a, b);
    parent[b] = a;
    if (rank1[a] == rank1[b]) rank1[a]++;
  }
}
int x[N], y[N];
int vis[N];
void dfs(int v) {
  vis[v] = 1;
  for (int i = 0; i < n; ++i) {
    if (vis[i]) {
      continue;
    }
    if (x[i] == x[v] || y[i] == y[v]) {
      dfs(i);
    }
  }
}
void SOLVE() {
  int tt, m, i, j, k, a, b, c, d, l, r;
  cin >> tt;
  while (tt--) {
    cin >> n;
    m = n / 2;
    if (n % 2) m--;
    string s = "";
    if (n - 2 * m) s += '7';
    for (i = 0; i < m; i++) s += "1";
    cout << s << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  FILE_OP();
  SOLVE();
  return 0;
}

### Prompt

Please provide a CPP coded solution to the problem described below:

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;
void FILE_OP() {}
const int N = 105;
int n;
int rank1[N], parent[N];
vector<int> adj[N];
void make_set(int v) {
  parent[v] = v;
  rank1[v] = 0;
}
long long int find_set(int v) {
  if (v == parent[v])
    return v;
  else
    v = find_set(parent[v]);
}
void union_set(int a, int b) {
  a = find_set(a);
  b = find_set(b);
  if (a != b) {
    if (rank1[a] < rank1[b]) swap(a, b);
    parent[b] = a;
    if (rank1[a] == rank1[b]) rank1[a]++;
  }
}
int x[N], y[N];
int vis[N];
void dfs(int v) {
  vis[v] = 1;
  for (int i = 0; i < n; ++i) {
    if (vis[i]) {
      continue;
    }
    if (x[i] == x[v] || y[i] == y[v]) {
      dfs(i);
    }
  }
}
void SOLVE() {
  int tt, m, i, j, k, a, b, c, d, l, r;
  cin >> tt;
  while (tt--) {
    cin >> n;
    m = n / 2;
    if (n % 2) m--;
    string s = "";
    if (n - 2 * m) s += '7';
    for (i = 0; i < m; i++) s += "1";
    cout << s << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  FILE_OP();
  SOLVE();
  return 0;
}

```