Adding Reversed Numbers

Time limit1sMemory limit128 MB

Problem

The Antique Comedians of Malidinesia prefer comedies to tragedies. Unfortunately, most of the ancient plays are tragedies. The troupe's dramatic advisor has therefore decided to transfigure some tragedies into comedies. This work is hard, because the basic sense of the play must be kept intact even though everything turns into its opposite. Take numbers, for example: whenever a number appears in the tragedy, it must be converted to its reversed form before being accepted into the comedy.

A reversed number is a number written in Arabic numerals but with the order of its digits reversed. The first digit becomes the last and vice versa. For example, if the hero had 1245 strawberries in the tragedy, he now has 5421 of them. All leading zeros are omitted, so if a number ends with a zero, that zero is lost when it is reversed (e.g. 1200 gives 21). A reversed number therefore never has trailing zeros.

You must now calculate with reversed numbers. Add two reversed numbers and output their reversed sum. Because a given number is the reversed form of several numbers (e.g. 21 could be 12, 120, or 1200 before reversing), assume that no zeros were lost when the input numbers were originally reversed (e.g. assume the original of 21 was 12).

Input

The first line contains a single positive integer N, the number of cases. Each of the following N lines contains two positive integers separated by a space — the two reversed numbers you must add. Each integer is less than 100,000,000.

Output

For each case, print exactly one line containing a single integer: the reversed sum of the two reversed numbers. Omit any leading zeros.