#!/usr/bin/perl
use strict;
use warnings;


my $res;
my  @small_seq;
my  @medium_seq;
my @large_seq;
my $max_seq = "";

while (<>) {
    chomp;
    if (length($_)<6){
	push(@small_seq, $_);
    }
    elsif (length($_)<10){
	push(@medium_seq, $_);
    }
    else {
	push(@large_seq, $_);
    }
	
    if( length($_) > length($max_seq) ){
        $max_seq = $_;
    }
}

print "small sequences:\n";
print join(" ",@small_seq), " \n";
print "medium sequences: \n";
print join(" ",@medium_seq), " \n";
print "large sequences: \n";
print join(" ",@large_seq), " \n";

print " \n";
print "max: ", $max_seq, "\n";
