Write a program that reads a task name on the first line of the input and then carries out that task. Every task here needs one loop nested inside another.
Supported tasks
permutation — read a string s. For every ordered pair of characters taken from s (outer loop over s, inner loop over s), print the two characters joined together whenever they are different. Print one pair per line.sorted_permutation — read a string s and do the same, but print a pair only when the first character comes strictly before the second one alphabetically.repeat_the_repeat — read an integer n and print the number made by writing 1, 2, …, n side by side (for example 123 when n is 3). Print that same number n times, one per line.repeat_incrementally — read a positive integer n and print the growing numbers 1, 12, 123, … up to 123…n, one per line.increment_and_decrement — read a positive integer n and print a pyramid of n lines: line i counts up from 1 to i and then back down to 1 (1, 121, 12321, …).Input format
The first line is the task name. The second line is the string (for permutation and
sorted_permutation) or the integer n (for the other tasks).
Output format
Whatever the chosen task prints, one item per line.
Write a complete program: read the input with input() and print the result with print().
Input
permutation
abc
Output
ab
ac
ba
bc
ca
cb