11.02%

Given an integer, you have to tell all the proper divisors (all divisors except the no. itself) of the number N in sorted manner. You also have to perform XOR operation on all these divisors and print the corresponding result.

**Input : **

The first line of input contains an integer T denoting the Test cases. Then T test cases follow. Each test case contains an integer N.

**Output : **

For each test case print 2 lines. In the first line print space separated values denoting the proper divisors of N. Then in the next line print the XOR of all the proper divisors of N.

**Constraints :**

1 ≤ T ≤ 110

1 ≤ N ≤ 10^{12}

**Example:
Input : **

2

10

8

**Output : **

1 2 5

6

1 2 4

7

**Explanation :**

Test case 1 : 1 XOR 2 XOR 5 = 6

Test case 2 : 1 XOR 2 XOR 4 = 7

Ibrahim Nash | 103 |

Stark_Maverick | 77 |

Eduardo Feo | 66 |

Rohit Sharma 16 | 65 |

Micky_Kt | 62 |

Lam Ngoc Pham | 463 |

All Is Well | 399 |

Divvya Sinha | 374 |

Prateek Gole | 369 |

Ibrahim Nash | 343 |

akhayrutdinov | 3855 |

sanjay05 | 3366 |

Michael Riegger | 2030 |

Jasleen Kaur 2 | 2012 |

Quandray | 1969 |