import Data.List main = interact $ unlines . (\(x:xs) -> filter (isPrefixOf x) xs) . lines
123 asdfjlasjdflkasjdf askldjflaksdfj 4hklfdgh * 123sdjfgkldfgj a123sdkfgjskdfg 123sdfjaksdf 12 123 12345 hui
123sdjfgkldfgj 123sdfjaksdf 123 12345
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!