Problem Description

Read n strings. Output their longest common prefix. If no common prefix, output EMPTY.

Input Format

First line n. Next n lines strings.

Output Format

One line prefix or EMPTY.

Sample Test Case

Input:
3 flower flow flight
Output:
fl

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next