Write a program that reads a task name on the first line of the input and then
carries out that task. Each one is a small classic that you should build out of
plain loops — solve them without reaching for min(), any() or all().
Supported tasks
factors — read a positive integer n and print every factor of n (including 1 and n itself) in ascending order, one per line.find_min — read an integer n, then n more integers one per line. Print the smallest of those n numbers.prime_check — read an integer and print True if it is prime and False otherwise. Anything less than 2 is not prime.is_sorted — read a string and print True if its characters are in alphabetical (non-decreasing) order, False otherwise.any_true — read an integer n, then n more integers one per line. Print True if at least one of them is divisible by 3, False otherwise.manhattan — read direction words, one per line, from LEFT, RIGHT, UP and DOWN, until the word STOP. Starting at the origin, each word moves you one step in that direction. Print the Manhattan distance of the final position from the origin, i.e. abs(x) + abs(y).Input format
The first line is the task name, followed by the lines that task reads.
Output format
A single value for find_min, prime_check, is_sorted, any_true and manhattan;
one factor per line for factors.
Write a complete program: read the input with input() and print the result with print().
Input
factors
12
Output
1
2
3
4
6
12