Problem Description

Given n strings, print their longest common prefix (or empty).

Input Format

First n. Next n lines strings.

Output Format

One line prefix.

Sample Test Case

Input:
3 flower flow flight
Output:
fl

Constraints

Total chars

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next