print("Program to Print First and last Element of a list in a Seperate List :=\n")




list1=['i',]

x = int(input("Enter the Range of list : "))

for i in range(x):
    y = int(input("Enter the Value : "))
    list1.append(y)

print(list1[1], list1[-1])





