Infosys-certification-problem

Problem Statement

Concider a non-empty array of position integers inarr. Identify and print outarr based onn the below logic:

Note: Each sequence will always reach 1 in finite number of steps

Input format:

First line contains the elements of inarr separated by " "(space).
Read the input from standard input stream.   <br />

Output format:

Print outarr with the elements separated by ',' to the standard output stream.
Sample Input Sample Output
10 100 7,26

Explanation

The elements of the given inarr are 10,100.
The sequence generated for each element starting from the left most element of inarr and their corresponding count are: