#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll norm(ll d, ll MOD) { return ((d % MOD) + MOD) % MOD; }
ll Madd(ll x, ll y, ll MOD) { return norm(norm(x, MOD) + norm(y, MOD), MOD); }
ll Msub(ll x, ll y, ll MOD) { return norm(norm(x, MOD) - norm(y, MOD), MOD); }
ll Mmul(ll x, ll y, ll MOD) { return norm(norm(x, MOD) * norm(y, MOD), MOD); }
ll fastpow(ll a, ll n, ll MOD) {
  if (n == 0LL) {
    return 1LL;
  }
  if (n % 2 == 1) {
    return (a * fastpow(a, n - 1, MOD)) % MOD;
  }
  ll tmp = fastpow(a, n / 2, MOD);
  return (tmp * tmp) % MOD;
}
ll Mdiv(ll a, ll b, ll PMOD) {
  return Mmul(a, fastpow(b, PMOD - 2LL, PMOD), PMOD);
}
ll dp[200000][10][10];
int main() {
  ll t;
  cin >> t;
  for (ll i = 1; i <= 200000; ++i) {
    for (ll j = 0; j < 10; ++j) {
      for (ll k = 0; k < 10; ++k) {
      }
    }
  }
  for (ll _ = 0; _ < t; ++_) {
    ll n, m;
    cin >> n >> m;
  }
  return 0;
}
