// name: microwave
import java.io.*;

public class MicrowaveGuide {
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    static class TestCase {
        // This is the class that stores the values in an input!
        long n;
        long m;
    }
    
    // You don't need to do anything here; I've already written it for you! You're welcome
    public static TestCase read() throws java.lang.Exception {
        // Creates a TestCase object to store the inputs
        TestCase testCase = new TestCase();

        // Read in the input and break it up over the space
        // Ex: turns "12.33 39.33" into ["12.33", "39.33"]
        String[] info = br.readLine().split(" ");

        // Turn the string into a long value
        testCase.n = Long.parseLong(info[0]);
        // Turn the string into a long value
        testCase.m = Long.parseLong(info[1]);

        return testCase;
    }

    public static void logic(TestCase testCase) {
        // duration: A positive integer denoting the time duration you want to set on the microwave, in seconds
        // addAmt: A positive integer denoting the how much the microwave's "Add" button adds to the timer, in seconds
        long duration = testCase.n;
        long addAmt = testCase.m;
        // It's your turn to code! Use the variable(s) above to find your answer

        // TODO: YOUR CODE HERE

        return; // Remember to output your solution; replace this line when you're done!
    }

	public static void main(String[] args) throws java.lang.Exception {
        int T = Integer.parseInt(br.readLine());
        for (int i = 0; i < T; i++) {
            logic(read());
        }
    }
}