Problem: You are given three integers a, b and c.

Find two positive integers x and y (x > 0, y > 0) such that: 

  * the decimal representation of x without leading zeroes consists of a digits; 
  * the decimal representation of y without leading zeroes consists of b digits; 
  * the decimal representation of gcd(x, y) without leading zeroes consists of c digits. 



gcd(x, y) denotes the [greatest common divisor (GCD)](https://en.wikipedia.org/wiki/Greatest_common_divisor) of integers x and y.

Output x and y. If there are multiple answers, output any of them.

Input

The first line contains a single integer t (1 ≤ t ≤ 285) — the number of testcases.

Each of the next t lines contains three integers a, b and c (1 ≤ a, b ≤ 9, 1 ≤ c ≤ min(a, b)) — the required lengths of the numbers.

It can be shown that the answer exists for all testcases under the given constraints.

Additional constraint on the input: all testcases are different.

Output

For each testcase print two positive integers — x and y (x > 0, y > 0) such that 

  * the decimal representation of x without leading zeroes consists of a digits; 
  * the decimal representation of y without leading zeroes consists of b digits; 
  * the decimal representation of gcd(x, y) without leading zeroes consists of c digits. 

Example

Input


4
2 3 1
2 2 2
6 6 2
1 1 1


Output


11 492
13 26
140133 160776
1 1

Note

In the example: 

  1. gcd(11, 492) = 1 
  2. gcd(13, 26) = 13 
  3. gcd(140133, 160776) = 21 
  4. gcd(1, 1) = 1 

Solution (in CPP):

Solution:
#include<bits/stdc++.h>
using namespace std;

typedef long long ll; 
typedef long double ld;
typedef pair<int, int> pi; 
typedef pair<ll, ll> pl; 
typedef pair<string, string> pss; 
typedef vector<int> vi; 
typedef vector<vi> vvi; 
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<ll> vl; 
typedef vector<vl> vvl; 
typedef map<int,int > mpi;
typedef queue<int> qi;
typedef priority_queue<int> pqi;
typedef priority_queue <int, vector<int>, greater<int>> minpq;

#define ff first
#define ss second
#define pb push_back
#define mkp make_pair
#define endline "\n"
#define print(a,b) cout<<a<<" "<<b<<endline

#define mod 1000000007 
#define mxN 10000000
#define all(v) v.begin(),v.end() 
#define rall(v) v.rbegin(),v.rend() 
#define fio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)


// int uint64_log10(uint64_t n)
// {
//   #define S(k, m) if (n >= UINT64_C(m)) { i += k; n /= UINT64_C(m); }

//   int i = -(n == 0);
//   S(16,10000000000000000); S(8,100000000); S(4,10000); S(2,100); S(1,10);
//   return i;

//   #undef S
// }

// int uint64_log2(uint64_t n)
// {
//   #define S(k) if (n >= (UINT64_C(1) << k)) { i += k; n >>= k; }

//   int i = -(n == 0); S(32); S(16); S(8); S(4); S(2); S(1); return i;

//   #undef S
// }


// ll fact[mxN];
// void factorial() {
//   fact[0] = 1 ;
//   for(ll i = 1;i< mxN;++i) 
//     fact[i] = ( i * fact[i-1] ) % mod ;
// }

ll power(int a,int b) {
  a %= mod ; 
  if(b == 0 ) return 1;
  ll p = power(a,b/2) % mod ;
  p = p * p % mod ;
  return b & 1 ? p * a % mod : p ; 
}

ll invMod(ll a) {
  return power(a,mod-2) % mod ;
}
int gcd(int a, int b) {
  if (a < b)swap(a, b);
  while (b) {
    int r = a % b; a = b; b = r;
  }
  return a;
}

// ll ncr(int n, int k) { 
//     ll res = 1; 
  
//     if (k > n - k) 
//         k = n - k; 
  
//     for (int i = 0; i < k; ++i) { 
//         res = (res* (n - i))%mod; 

//         res = (res *invMod(i+1))%mod;
//     } 
  
//     return res; 
// } 


void prt(vi v){
  for (int i=0;i<v.size();i++){
    cout<<v[i]<<" ";
  }
  cout<<endl;
}
void prt2d(vvi v){
  for (int i=0;i<v.size();i++){

    for(int j=0;j<v[0].size();j++)
       cout<<v[i][j]<<" ";
    cout<<endl;
  }
}


void solve(){
  ll i,j,n;
  
  ll a,b,c;
  cin>>a>>b>>c;

  ll g=1;
  ll nc,na,nb;
  na=power(10,a-1);
  nb=power(10,b-1);
  nc=power(10,c-1);
  while(g<= nc)g*=2;
  
  ll x=g,y=g;
  
  while(x<=na) x*=3;

  while(y<=nb) y*=10;

  print(x,y);


}



//bool compare( int a[2], int b[2]) { return (a[1]<=a[1]) ; }
int main(){
  fio;
  #ifndef ONLINE_JUDGE
     freopen("input.txt","r", stdin);
     freopen("output.txt","w", stdout);
    #endif
   
   int i,j,t=1;
   cin>>t;

   while(t--){
     solve();
   }
   
   return 0;
}