#C9437. Longest Common Prefix
Longest Common Prefix
Longest Common Prefix
You are given an integer \( n \) and \( n \) strings containing only lowercase letters. Your task is to find the longest common prefix among these strings.
The longest common prefix is defined as the longest string \( P \) such that every string in the list starts with \( P \). Formally, if the strings are \( s_1, s_2, \dots, s_n \), then \( P \) is a prefix of each \( s_i \). If there is no common prefix, output an empty string.
Example:
Input: 3 flower flow flight</p>Output: fl
inputFormat
The first line of the input contains a single integer \( n \) representing the number of strings. The following \( n \) lines each contain a single string.
outputFormat
Print a single line containing the longest common prefix of the given strings. If there is no common prefix, print an empty line.
## sample3
flower
flow
flight
fl