my code is correct but it is passing only one test case here is my code https://ide.codingblocks.com/s/268463
hello @jatinupadhyay786 u dont have to print print space between two consecutive elements.