 Base Conversion
##### Submissions: 617   Accuracy: 32.1%   Difficulty: Basic   Marks: 1

Given a number in decimal convert it to binary, a number in binary to decimal, decimal to hexadecimal and hexadecimal to decimal.

Input:

The first line of input takes the number of test cases, T . Then T test cases follow

Each test case contains  4 space separated integers, A in decimal, B binary,C decimal and D hexadecimal respectively.

Output:

Print 4 space separated integers representing the binary equivalent of A, decimal equivalent of B, hexadecimal equivalent of C and decimal equivalent of D respectively.

Constraints:

1<=T<=100

1<=A,C<=500

1<=B<=100000(base 2)

1<=D<=100000(base 16)

Example:

Input:
3
6 110 20 2A
10 111 25 FA
23 1011 22 FB4

Output:
110 6 14 42
1010 7 19 250
10111 11 16 4020

#### ** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Arpan Kundu
Author: akundusaltlake

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.