Added print_result_by_seq_length function