/*
 * This template is valid both in C and in C++,
 * so you can expand it with code from both languages.
 * NOTE: it is recommended to use this even if you don't
 * understand the following code.
 */

#include <stdio.h>
#include <assert.h>

// constraints
#define MAXN 100000

// input data
int T, N, K, i, j;
int A[MAXN], B[MAXN];

int main() {
//  uncomment the following lines if you want to read/write from files
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);

    assert(1 == scanf("%d", &T));
    for(i=0; i<T; i++) {
        assert(2 == scanf("%d %d", &N, &K));
        for (j=0; j<N; j++)
            assert(2 == scanf("%d %d", &A[j], &B[j]));

        // insert your code here
    
        long long result = 1234567891011l;
        printf("%lld\n", result); // print the result
    }
    return 0;
}
