#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int modulo(long long int a, long long int b) {
  long long int r = a % b;
  return r < 0 ? r + b : r;
}
long long int longrem(string k, long long int n) {
  int now = 0;
  for (int i = 0; i < k.size(); i++) {
    now = (now * 10) % n;
    now = (now + k[i] - '0') % n;
  }
  return now;
}
long long int ncr(long long int n, long long int k) {
  long long int res = 1;
  if (k > n - k) k = n - k;
  for (long long int i = 0; i < k; ++i) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
long long int binaryToDecimal(long long int n) {
  long long int num = n;
  long long int dec_value = 0;
  long long int base = 1;
  long long int temp = num;
  while (temp) {
    long long int last_digit = temp % 10;
    temp = temp / 10;
    dec_value += last_digit * base;
    base = base * 2;
  }
  return dec_value;
}
void decToBinary(int n) {
  int binaryNum[32];
  int i = 0;
  while (n > 0) {
    binaryNum[i] = n % 2;
    n = n / 2;
    i++;
  }
  for (int j = i - 1; j >= 0; j--) cout << binaryNum[j];
}
long long int prime(long long int n) {
  long long int flag = 0;
  if (n == 1 || n == 2) {
    flag = 0;
  } else {
    if (n % 2 == 0)
      flag = 1;
    else {
      long long int i = 3;
      while (i <= sqrt(n) && flag == 0) {
        if (n % i == 0) flag = 1;
        i = i + 3;
      }
    }
  }
  return flag;
}
long long int ispal(string str, string s) {
  long long int flag = 0;
  reverse(str.begin(), str.end());
  if (str == s) {
    flag = 1;
  }
  return flag;
}
long long int ispalself(string str) {
  long long int flag = 0;
  string s = str;
  reverse(str.begin(), str.end());
  if (str == s) {
    flag = 1;
  }
  return flag;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, tm, i;
    cin >> n;
    if (n % 2) {
      n = n - 3;
      cout << "7";
      tm = n / 2;
      for (i = 1; i <= tm; i++) {
        cout << "1";
      }
    } else {
      tm = n / 2;
      for (i = 1; i <= tm; i++) {
        cout << "1";
      }
    }
    cout << "\n";
  }
}

### Prompt

Develop a solution in CPP 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;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int modulo(long long int a, long long int b) {
  long long int r = a % b;
  return r < 0 ? r + b : r;
}
long long int longrem(string k, long long int n) {
  int now = 0;
  for (int i = 0; i < k.size(); i++) {
    now = (now * 10) % n;
    now = (now + k[i] - '0') % n;
  }
  return now;
}
long long int ncr(long long int n, long long int k) {
  long long int res = 1;
  if (k > n - k) k = n - k;
  for (long long int i = 0; i < k; ++i) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
long long int binaryToDecimal(long long int n) {
  long long int num = n;
  long long int dec_value = 0;
  long long int base = 1;
  long long int temp = num;
  while (temp) {
    long long int last_digit = temp % 10;
    temp = temp / 10;
    dec_value += last_digit * base;
    base = base * 2;
  }
  return dec_value;
}
void decToBinary(int n) {
  int binaryNum[32];
  int i = 0;
  while (n > 0) {
    binaryNum[i] = n % 2;
    n = n / 2;
    i++;
  }
  for (int j = i - 1; j >= 0; j--) cout << binaryNum[j];
}
long long int prime(long long int n) {
  long long int flag = 0;
  if (n == 1 || n == 2) {
    flag = 0;
  } else {
    if (n % 2 == 0)
      flag = 1;
    else {
      long long int i = 3;
      while (i <= sqrt(n) && flag == 0) {
        if (n % i == 0) flag = 1;
        i = i + 3;
      }
    }
  }
  return flag;
}
long long int ispal(string str, string s) {
  long long int flag = 0;
  reverse(str.begin(), str.end());
  if (str == s) {
    flag = 1;
  }
  return flag;
}
long long int ispalself(string str) {
  long long int flag = 0;
  string s = str;
  reverse(str.begin(), str.end());
  if (str == s) {
    flag = 1;
  }
  return flag;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, tm, i;
    cin >> n;
    if (n % 2) {
      n = n - 3;
      cout << "7";
      tm = n / 2;
      for (i = 1; i <= tm; i++) {
        cout << "1";
      }
    } else {
      tm = n / 2;
      for (i = 1; i <= tm; i++) {
        cout << "1";
      }
    }
    cout << "\n";
  }
}

```