using System;
class Program
    static void Main()
    {
        int t = Convert.ToInt32(Console.ReadLine());
for(int i = 0; i < t; i++)
{
    string[] unos = Console.ReadLine().Split();
    int n = Convert.ToInt32(unos[0]);
    int m = Convert.ToInt32(unos[1]);
}
Console.WriteLine(-1);
    }