Find the Output

Zunga and Chocolate Bars

Zunga has N chocolate bars.He has to arrange them on the table in rows and columns. Print all possible ways he can arrange them

Sample Input 1
Output
Sample Input 2
Output

Question to try

Given a string s consisting of small english letters, find and return the first instance of a non repeating character in it. If there is no such repeating character, return '-'.

Input
Output

Question to try
Try the question attached below.
Question attachment