My Password is a Palindromic Prime Number

Gauss’ is a clever guy who is a little obsessed with information security, that’s why he is always looking for the most secure password. After a long research Gauss is choosing for his password a palindromic prime number ppm, which is ultra secure, the only problem is that he always forgets it. As a help to his bad memory, Gauss wants to write a file with the decimal number produced by the division of one (1) and his password, 1/ppm. Gauss knows that the result is always a pure recurring (periodic) decimal number, and therefore he only wants to save the number with its period. For example: Gauss’ Password (PPM) 101 757 191 11311 14341 79997 Decimal Number 1/PPM Length 1/PPM (period) 0,0099 4 0,001321003963011889035667107 27 0,005235602094240837696335078534031413612565445 95 02617801047120418848167539267015706806282722513 089 0,000088409512863584121651489700291751392449827 377 6014499160109627795950844310847847228361771726 6377862257978958535938466979046945451330563168 5969410308549199893908584563699054018212359649 8983290602068782601007868446644858986826982583 3259658739280346565290425249756873839625143665 4584033241976836707629740960127309698523561135 1781451684201220051277517460878790557864026169 2158076209 A number of 14340 decimals: 0,0000697301443 14340 413987866954884596611114985008018966599260860 469981172861027822327592218115891499895404783 48790181995676731050833275224879... A number of 39998 decimals 39998 Having the file, Gauss knows that he can execute an algorithm to remember his password. Can you help Gauss to write the file? Input The first line of the input contains an integer t, the number of test cases, followed by t lines, each line contains a palindromic prime number n (10 < n < 105). Output For each test case print the pure recurring decimal number that will help Gauss to remember his password. (Use ‘.’ as a decimal point) Sample Input 2

2/2 101 757 Sample Output 0.0099 0.001321003963011889035667107