Challenge: Swap Two Values

Lab Python Beginner 10 points

Read two words into variables a and b. Swap them, so that a holds the second word and b holds the first, then print a and b on separate lines.

Input

Two lines, one word on each.

Output

The value of a, then the value of b, after swapping.

Example

Input

tea
coffee

Output

coffee
tea
Sample input available Sample output available
Editor
Python

Hints

You could use a third variable: temp = a, then a = b, then b = temp.

Python also has a shortcut: a, b = b, a

Solution explanation

a, b = b, a swaps in one step. The classic way uses a spare variable: temp = a, a = b, b = temp.

Show solution
a = input()
b = input()
a, b = b, a
print(a)
print(b)
Output
Answer
HOME LEARN COMMUNITY DASHBOARD