最短文字列と最長文字列

3つの文字列が与えられたとき、最初の行に最短の文字列を、その次の行に最長の文字列を出力します。もし同じ長さの文字列が2つある場合は、入力から最初に現れる文字列を出力することを期待しています。

入力

出力

short one
the very very long long string with many words
some medium string here

short one
the very very long long string with many words

AAA
AA
AAAA

AA
AAAA

A
AA
AAA

A
AAA

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue