how to take fast input in python
# Fast Input and Output in Python
from sys import stdin, stdout
# For single input:
input = int(stdin.readline())
# For multiple inputs from single line:
def get_inputs():
return map(int, sys.stdin.readline().strip().split())
input1, input2, input3, input4 = get_inputs()
# For fast output
stdout.write(n1)
stdout.write(str(input1) + 'n' + str(input2) + 'n' + str(input3))
# Contributed by Supantha Roy