Skip to content

Instantly share code, notes, and snippets.

@avrilcoghlan
Last active June 19, 2022 12:20
Show Gist options
  • Save avrilcoghlan/4080983 to your computer and use it in GitHub Desktop.
Save avrilcoghlan/4080983 to your computer and use it in GitHub Desktop.
Perl script to run GeneWise by comparing a file of multiple of HMMs to a fasta file of multiple sequences, by running GeneWise on the regions of the DNA sequences where the proteins used to make the HMM have tblastn matches
This file has been truncated, but you can view the full file.
#!/usr/local/bin/perl
=head1 NAME
run_genewisedb_afterblast.pl
=head1 SYNOPSIS
run_genewisedb_afterblast.pl input_fasta input_hmms output outputdir spliceflat parameterfile treefam_seqs eval_cutoff flank_length blast_path
where input_fasta is the input fasta file of scaffolds,
input_hmms is the input file of HMMs,
output is the genewise output file,
outputdir is the output directory for writing output files,
spliceflat says whether to use the -splice flat option (yes/no),
parameterfile is the name of the intron parameter file (none if there is none),
treefam_seqs is the file of protein sequences in TreeFam families,
eval_cutoff is the evalue cutoff to use for blast matches,
flank_length is the length of DNA to take on either side of a blast match,
blast_path is the path to the blastall and formatdb executables.
=head1 DESCRIPTION
This script takes an input fasta file of scaffolds (<input_fasta>) and an input
file of HMMs (<input_hmms>). For each HMM and scaffold, we first check is there
a blast match between the HMM and scaffold. If so, we run genewise on the scaffold,
using that HMM. The output is then written in the output file <output>.
Before running this perl script you need to run:
setenv WISECONFIGDIR /nfs/users/nfs_a/alc/Documents/GeneWise/wise2.4.1/wisecfg/
/software/bin/formatdb -i <input_fasta> -o T -p F
where <input_fasta> is your input fasta file of scaffolds.
Note: make sure to use the version of formatdb in /software/bin/formatdb
=head1 VERSION
Perl script last edited 8-Nov-2012.
=head1 CONTACT
alc@sanger.ac.uk (Avril Coghlan)
=cut
#
# Perl script run_genewisedb_afterblast.pl
# Written by Avril Coghlan (alc@sanger.ac.uk)
# 8-Nov-12.
# Last edited 27-Nov-2012.
# SCRIPT SYNOPSIS: run_genewisedb_afterblast.pl: run GeneWise using TreeFam HMMs, in scaffold regions that have blast matches to the proteins used to build the HMMs.
#
#------------------------------------------------------------------#
# CHECK IF THERE ARE THE CORRECT NUMBER OF COMMAND-LINE ARGUMENTS:
use strict;
use warnings;
my $num_args = $#ARGV + 1;
if ($num_args != 10)
{
print "Usage of run_genewisedb_afterblast.pl\n\n";
print "perl run_genewisedb_afterblast.pl <input_fasta> <input_hmms> <output> <outputdir> <spliceflat> <parameterfile> <treefam_seqs> <eval_cutoff> <flank_length> <blast_path>\n";
print "where <input_fasta> is the input fasta file,\n";
print " <input_hmms> is the input file of HMMs,\n";
print " <output> is the genewise output file,\n";
print " <outputdir> is the output directory for writing output files,\n";
print " <spliceflat> says whether to use the -splice flat option (yes/no),\n";
print " <parameterfile> is the name of the intron parameter file (none if there is none),\n";
print " <treefam_seqs> is the file of protein sequences in TreeFam families,\n";
print " <eval_cutoff> is the evalue cutoff to use for blast matches,\n";
print " <flank_length> is the length of DNA to take on either side of a blast match,\n";
print " <blast_path> is the path to the blastall and formatdb executables\n";
print "For example, >perl run_genewisedb_afterblast.pl \n";
print "/nfs/helminths02/analysis/50HGP/Brugia.pahangi/ASSEMBLY/v1.0.pipeline/S07.Im.SS.Gf.Rr.scaffolds.fa\n";
print "/lustre/scratch108/parasites/es9/GeneWise/TreeFam8.hmm genewise_output\n";
print "/nfs/users/nfs_a/alc/Documents/GeneWise50Helminths no mygenestat.stat\n";
print "treefam8_seqs 0.05 25000 /software/bin/\n";
print "NOTE: Before running this perl script, you need to run:\n";
print "setenv WISECONFIGDIR /nfs/users/nfs_a/alc/Documents/GeneWise/wise2.4.1/wisecfg/\n";
print "/software/bin/formatdb -i <input_fasta> -o T -p F\n";
print "where <input_fasta> is your input fasta file of scaffolds.\n";
print "Note: make sure to use the version of formatdb in /software/bin/formatdb\n";
exit;
}
# FIND THE PATH TO THE INPUT FASTA FILE:
my $input_fasta = $ARGV[0];
# FIND THE INPUT FILE OF HMMs:
my $input_hmms = $ARGV[1];
# FIND THE GENEWISE OUTPUT FILE:
my $output = $ARGV[2];
# FIND THE DIRECTORY TO USE FOR OUTPUT FILES:
my $outputdir = $ARGV[3];
# FIND OUT WHETHER WE WANT TO USE THE -splice flat OPTION IN GENEWISE:
my $spliceflat = $ARGV[4];
# FIND THE NAME OF THE INTRON PARAMETER FILE:
my $parameterfile = $ARGV[5];
# FIND THE NAME OF THE FILE WITH PROTEIN SEQUENCES IN TREEFAM FAMILIES:
my $treefam_seqs = $ARGV[6];
# FIND THE EVALUE CUTOFF TO USE FOR BLAST MATCHES:
my $evalue_cutoff = $ARGV[7];
# FIND THE LENGTH OF DNA TO TAKE ON EITHER SIDE OF A BLAST MATCH:
my $flank_length = $ARGV[8];
# FIND THE PATH TO THE FORMATDB AND BLASTALL EXECUTABLES:
my $blast_path = $ARGV[9];
#------------------------------------------------------------------#
# CHECK THAT THE WISECONFIGDIR IS SET CORRECTLY:
(my $errorcode,my $errormsg) = &check_wiseconfigdir;
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
#------------------------------------------------------------------#
# TEST SUBROUTINES:
my $PRINT_TEST_DATA = 0; # SAYS WHETHER TO PRINT DATA USED DURING TESTING.
&test_update_feature_types_in_gff($outputdir);
&test_update_genewise_output($outputdir);
&test_make_seqfile($outputdir);
&test_check_if_have_hmm_for_family($outputdir);
&test_print_error;
&test_make_hmmfile($outputdir);
&test_merge_overlapping_hits;
&test_check_for_blast_match($outputdir,$blast_path);
&test_run_genewise_on_scaffolds($outputdir,$blast_path);
&test_find_pos_of_hmms($outputdir);
&test_check_formatdb_files($outputdir);
&test_find_pos_of_scaffolds($outputdir);
print STDERR "Tests done, running main code...\n";
#------------------------------------------------------------------#
# RUN THE MAIN PART OF THE CODE:
&run_main_program($outputdir,$input_fasta,$input_hmms,$output,$spliceflat,$parameterfile,$treefam_seqs,$evalue_cutoff,$flank_length,$blast_path);
print STDERR "FINISHED.\n";
#------------------------------------------------------------------#
# RUN THE MAIN PART OF THE CODE:
sub run_main_program
{
my $outputdir = $_[0]; # DIRECTORY TO PUT OUTPUT FILES IN.
my $input_fasta = $_[1]; # THE INPUT FASTA FILE
my $input_hmms = $_[2]; # THE INPUT FILE OF HMMs
my $output = $_[3]; # THE OUTPUT FILE NAME
my $spliceflat = $_[4]; # SAYS WHETHER WE WANT TO USE THE -splice flat OPTION IN GENEWISE
my $parameterfile = $_[5]; # THE NAME OF THE INTRON PARAMETER FILE
my $treefam_seqs = $_[6]; # FILE OF PROTEIN SEQUENCES IN TREEFAM FAMILIES
my $evalue_cutoff = $_[7]; # EVALUE CUTOFF TO USE FOR BLAST MATCHES
my $flank_length = $_[8]; # LENGTH OF SEQUENCE TO TAKE ON EITHER SIDE OF A BLAST MATCH
my $blast_path = $_[9]; # PATH TO THE FORMATDB AND BLASTALL EXECUTABLES
my $errorcode; # RETURNED AS 0 IF THERE IS NO ERROR.
my $errormsg; # RETURNED AS 'none' IF THERE IS NO ERROR.
my $hmm_pos_file; # FILE WITH POSITIONS OF HMMs IN $input_hmms
my $scaffold_pos_file; # FILE WITH POSITIONS OF SCAFFOLDS IN $input_fasta
my $TAKE_FAMILY; # HASH TABLE THAT SAYS WHETHER TO TAKE A PARTICULAR FAMILY
# RECORD THE POSITIONS OF THE HMMs IN $input_hmms:
print STDERR "Reading positions of the HMMs in $input_hmms...\n";
($hmm_pos_file,$TAKE_FAMILY,$errorcode,$errormsg) = &find_pos_of_hmms($input_hmms,$outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
# RECORD THE POSITION OF THE SCAFFOLDS IN $input_fasta:
print STDERR "Reading the positions of the scaffolds in $input_fasta...\n";
($scaffold_pos_file,$errorcode,$errormsg) = &find_pos_of_scaffolds($input_fasta,$outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
# RUN GENEWISE WITH ONE SCAFFOLD/CONTIG AT A TIME, ON ONE HMM AT A TIME:
print STDERR "Running genewise on scaffolds to make output file $outputdir/$output...\n";
($errorcode,$errormsg) = &run_genewise_on_scaffolds($outputdir,$input_fasta,$input_hmms,$output,$spliceflat,$parameterfile,$treefam_seqs,
$evalue_cutoff,$flank_length,0,$hmm_pos_file,$blast_path,$scaffold_pos_file,$TAKE_FAMILY);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
print STDERR "Post-processing genewise output file $outputdir/$output...\n";
# REPLACE 'match' IN THE FEATURE COLUMN WITH 'gene', AND 'cds' WITH 'CDS':
($errorcode,$errormsg) = &update_feature_types_in_gff($output,$outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
# DELETE TEMPORARY FILES:
system "rm -f $hmm_pos_file";
}
#------------------------------------------------------------------#
# TEST &update_feature_types_in_gff
sub test_update_feature_types_in_gff
{
my $outputdir = $_[0]; # DIRECTORY FOR PUTTING OUTPUT FILES INTO
my $output; # OUTPUT GFF FILE
my $errorcode; # RETURNED AS 0 BY A FUNCTION IF THERE IS NO ERROR
my $errormsg; # RETURNED AS 'none' BY A FUNCTION IF THERE IS NO ERROR
my $expected_output; # FILE WITH THE EXPECTED CONTENTS OF $output
my $differences; # DIFFERENCES BETWEEN $output AND $expected_output
my $length_differences; # LENGTH OF $differences
my $line; #
($output,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(OUTPUT,">$output") || die "ERROR: test_update_feature_types_in_gff: cannot open $output\n";
print OUTPUT "TF101001\n";
print OUTPUT "V:15395346..15397430 GeneWise match 2 1681 514.02 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print OUTPUT "V:15395346..15397430 GeneWise cds 2 11 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print OUTPUT "V:15395346..15397430 GeneWise intron 12 342 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print OUTPUT "V:15395346..15397430 GeneWise cds 343 396 0.00 + 2 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print OUTPUT "V:15395346..15397430 GeneWise intron 397 448 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print OUTPUT "V:15395346..15397430 GeneWise cds 449 543 0.00 + 2 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print OUTPUT "V:15395346..15397430 GeneWise intron 544 594 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print OUTPUT "V:15395346..15397430 GeneWise cds 595 1017 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print OUTPUT "V:15395346..15397430 GeneWise intron 1018 1066 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print OUTPUT "V:15395346..15397430 GeneWise cds 1067 1560 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print OUTPUT "V:15395346..15397430 GeneWise intron 1561 1605 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print OUTPUT "V:15395346..15397430 GeneWise cds 1606 1681 0.00 + 1 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print OUTPUT "V:15395346..15397430 GeneWise match 37437 63766 -315.16 + . ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print OUTPUT "V:15395346..15397430 GeneWise cds 37437 62083 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print OUTPUT "V:15395346..15397430 GeneWise intron 62084 62744 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print OUTPUT "V:15395346..15397430 GeneWise cds 62745 63102 0.00 + 1 ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print OUTPUT "V:15395346..15397430 GeneWise intron 63103 63151 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print OUTPUT "V:15395346..15397430 GeneWise cds 63152 63645 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print OUTPUT "V:15395346..15397430 GeneWise intron 63646 63690 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print OUTPUT "V:15395346..15397430 GeneWise cds 63691 63766 0.00 + 1 ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print OUTPUT "V:15395346..15397430 GeneWise match 64165 64167 0.12 - . ID=V:15395346..15397430-TF101001-genewise-prediction-3\n";
print OUTPUT "V:15395346..15397430 GeneWise cds 64165 64167 0.00 - 0 ID=V:15395346..15397430-TF101001-genewise-prediction-3\n";
print OUTPUT "//\n";
close(OUTPUT);
($errorcode,$errormsg) = &update_feature_types_in_gff($output,$outputdir);
if ($errorcode != 0) { print STDERR "ERROR: test_update_feature_types_in_gff: failed test1\n"; exit;}
($expected_output,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(EXPECTED,">$expected_output") || die "ERROR: test_update_feature_types_in_gff: cannot open $expected_output\n";
print EXPECTED "TF101001\n";
print EXPECTED "V:15395346..15397430 GeneWise gene 2 1681 514.02 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise CDS 2 11 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 12 342 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise CDS 343 396 0.00 + 2 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 397 448 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise CDS 449 543 0.00 + 2 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 544 594 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise CDS 595 1017 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 1018 1066 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise CDS 1067 1560 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 1561 1605 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise CDS 1606 1681 0.00 + 1 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise gene 37437 63766 -315.16 + . ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise CDS 37437 62083 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 62084 62744 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise CDS 62745 63102 0.00 + 1 ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 63103 63151 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise CDS 63152 63645 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 63646 63690 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise CDS 63691 63766 0.00 + 1 ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise gene 64165 64167 0.12 - . ID=V:15395346..15397430-TF101001-genewise-prediction-3\n";
print EXPECTED "V:15395346..15397430 GeneWise CDS 64165 64167 0.00 - 0 ID=V:15395346..15397430-TF101001-genewise-prediction-3\n";
print EXPECTED "//\n";
close(EXPECTED);
$differences = "";
open(TEMP,"diff $expected_output $output |");
while(<TEMP>)
{
$line = $_;
$differences = $differences.$line;
}
close(TEMP);
$length_differences = length($differences);
if ($length_differences != 0) { print STDERR "ERROR: test_update_feature_types_in_gff: failed test1 (output $output expected_output $expected_output)\n"; exit;}
system "rm -f $expected_output";
system "rm -f $output";
}
#------------------------------------------------------------------#
# REPLACE 'match' IN THE FEATURE COLUMN WITH 'gene', AND 'cds' WITH 'CDS':
# THIS IS REQUIRED TO USE THE GENEWISE OUTPUT AS INPUT TO MAKER (WHICH REQUIRES gene/CDS FEATURE TYPES):
sub update_feature_types_in_gff
{
my $output = $_[0]; # NAME OF THE OUTPUT GFF FILE
my $outputdir = $_[1]; # DIRECTORY TO PUT OUTPUT FILES INTO
my $errorcode = 0; # RETURNED AS 0 IF THERE IS NO ERROR
my $errormsg = "none";# RETURNED AS 'none' IF THERE IS NO ERROR
my $cmd; # COMMAND TO RUN
# REPLACE 'cds' WITH 'CDS' IN THE GFF FILE:
$cmd = "sed -i \'s/cds/CDS/g\' $output";
system "$cmd";
sleep(60); # FORCE PERL TO WAIT UNTIL THE 'sed' JOB IS COMPLETE (THIS IS NECESSARY)
# REPLACE 'match' WITH 'gene' IN THE GFF FILE:
$cmd = "sed -i \'s/match/gene/g\' $output";
system "$cmd";
sleep(60); # FORCE PERL TO WAIT UNTIL THE 'sed' JOB IS COMPLETE (THIS IS NECESSARY)
return($errorcode,$errormsg);
}
#------------------------------------------------------------------#
# SUBROUTINE TO MAKE A FILE NAME FOR A TEMPORARY FILE:
sub make_filename
{
my $outputdir = $_[0]; # OUTPUT DIRECTORY TO WRITE TEMPORARY FILE NAME TO
my $found_name = 0; # SAYS WHETHER WE HAVE FOUND A FILE NAME YET
my $filename = "none";# NEW FILE NAME TO USE
my $errorcode = 0; # RETURNED AS 0 IF THERE IS NO ERROR
my $errormsg = "none";# RETURNED AS 'none' IF THERE IS NO ERROR
my $poss_filename; # POSSIBLE FILE NAME TO USE
my $random_number; # RANDOM NUMBER TO USE IN TEMPORARY FILE NAME
while($found_name == 0)
{
$random_number = rand();
$poss_filename = $outputdir."/tmp".$random_number;
if (!(-e $poss_filename))
{
$filename = $poss_filename;
$found_name = 1;
}
}
if ($found_name == 0 || $filename eq 'none')
{
$errormsg = "ERROR: make_filename: found_name $found_name filename $filename\n";
$errorcode = 6; # ERRORCODE=6
return($filename,$errorcode,$errormsg);
}
return($filename,$errorcode,$errormsg);
}
#------------------------------------------------------------------#
# TEST &find_pos_of_hmms
sub test_find_pos_of_hmms
{
my $outputdir = $_[0]; # DIRECTORY FOR WRITING OUTPUT FILES IN
my $input_hmmfile; # INPUT FILE OF HMMs
my $errorcode; # RETURNED AS 0 BY A FUNCTION IF THERE IS NO ERROR
my $errormsg; # RETURNED AS 'none' BY A FUNCTION IF THERE IS NO ERROR
my $hmm_pos_file; # FILE WITH POSITIONS OF HMMs
my $expected_hmm_pos_file; # FILE WITH EXPECTED CONTENTS OF $hmm_pos_file
my $differences; # DIFFERENCES BETWEEN $hmm_pos_file AND $expected_hmm_pos_file
my $length_differences; # LENGTH OF $differences
my $line; #
my $TAKE_FAMILY; # HASH TABLE THAT SAYS WHETHER TO TAKE A PARTICULAR FAMILY
($input_hmmfile,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(HMMFILE,">$input_hmmfile") || die "ERROR: test_find_pos_of_hmms: cannot open $input_hmmfile\n";
print HMMFILE "HMMER2.0 [2.3.2]\n";
print HMMFILE "NAME TF101093.0\n";
print HMMFILE "//\n"; # LINE 3
print HMMFILE "HMMER2.0 [2.3.2]\n";
print HMMFILE "NAME TF101094.0\n";
print HMMFILE "//\n"; # LINE 6
print HMMFILE "HMMER2.0 [2.3.2]\n";
print HMMFILE "NAME TF101095.0\n";
print HMMFILE "//\n"; # LINE 9
print HMMFILE "HMMER2.0 [2.3.2]\n";
print HMMFILE "NAME TF101096.0\n";
print HMMFILE "//\n"; # LINE 12
print HMMFILE "HMMER2.0 [2.3.2]\n";
print HMMFILE "NAME TF101097.0\n";
print HMMFILE "//\n"; # LINE 15
print HMMFILE "HMMER2.0 [2.3.2]\n";
print HMMFILE "NAME TF101098.0\n";
print HMMFILE "//\n"; # LINE 18
print HMMFILE "HMMER2.0 [2.3.2]\n";
print HMMFILE "NAME TF101099.0\n";
print HMMFILE "//\n";
close(HMMFILE);
($hmm_pos_file,$TAKE_FAMILY,$errorcode,$errormsg) = &find_pos_of_hmms($input_hmmfile,$outputdir);
if ($errorcode != 0 || !(defined($TAKE_FAMILY->{"TF101093"})) || !(defined($TAKE_FAMILY->{"TF101094"})) ||
!(defined($TAKE_FAMILY->{"TF101095"})) || !(defined($TAKE_FAMILY->{"TF101096"})) ||
!(defined($TAKE_FAMILY->{"TF101097"})) || !(defined($TAKE_FAMILY->{"TF101098"})) ||
!(defined($TAKE_FAMILY->{"TF101099"})) ) { print STDERR "ERROR: test_find_pos_of_hmms: failed test1\n"; exit;}
($expected_hmm_pos_file,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(EXPECTED,">$expected_hmm_pos_file") || die "ERROR: test_find_pos_of_hmms: cannot open $expected_hmm_pos_file\n";
print EXPECTED "TF101093 3\n";
print EXPECTED "TF101094 6\n";
print EXPECTED "TF101095 9\n";
print EXPECTED "TF101096 12\n";
print EXPECTED "TF101097 15\n";
print EXPECTED "TF101098 18\n";
print EXPECTED "TF101099 21\n";
close(EXPECTED);
$differences = "";
open(TEMP,"diff $hmm_pos_file $expected_hmm_pos_file |");
while(<TEMP>)
{
$line = $_;
$differences = $differences.$line;
}
close(TEMP);
$length_differences = length($differences);
if ($length_differences != 0) { print STDERR "ERROR: test_find_pos_of_hmms: failed test1 (files $hmm_pos_file $expected_hmm_pos_file)\n"; exit;}
# DELETE TEMPORARY FILES:
system "rm -f $input_hmmfile";
system "rm -f $hmm_pos_file";
system "rm -f $expected_hmm_pos_file";
}
#------------------------------------------------------------------#
# TEST &find_pos_of_scaffolds
sub test_find_pos_of_scaffolds
{
my $outputdir = $_[0]; ## DIRECTORY FOR WRITING OUTPUT FILES IN
my $input_fasta; ## INPUT FILE OF SCAFFOLDS
my $errorcode; ## RETURNED AS 0 BY A FUNCTION IF THERE IS NO ERROR
my $errormsg; ## RETURNED AS 'none' BY A FUNCTION IF THERE IS NO ERROR
my $scaffold_pos_file; ## FILE WITH POSITIONS OF SCAFFOLDS
my $expected_scaffold_pos_file; ## FILE WITH EXPECTED CONTENTS OF $scaffold_pos_file
my $differences; ## DIFFERENCES BETWEEN $scaffold_pos_file AND $expected_scaffold_pos_file
my $length_differences; ## LENGTH OF $differences
my $line; ##
($input_fasta,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(FASTA,">$input_fasta") || die "ERROR: test_find_pos_of_scaffolds: cannot open $input_fasta\n";
print FASTA ">scaffold2\n";
print FASTA "ABCDEFG\n";
print FASTA ">scaffold3\n";
print FASTA "ABCDEFG\n";
print FASTA "ABCDEFG\n";
print FASTA ">scaffold1\n";
print FASTA "ABCDEFG\n";
print FASTA "ABCDEFG\n";
print FASTA "ABCDEFG\n";
print FASTA "ABCDEFG\n";
close(FASTA);
($scaffold_pos_file,$errorcode,$errormsg) = &find_pos_of_scaffolds($input_fasta,$outputdir);
if ($errorcode != 0) { print STDERR "ERROR: test_find_pos_of_scaffolds: failed test1\n"; exit;}
($expected_scaffold_pos_file,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(EXPECTED,">$expected_scaffold_pos_file") || die "ERROR: test_find_pos_of_scaffolds: cannot open $expected_scaffold_pos_file\n";
print EXPECTED "scaffold2 2\n";
print EXPECTED "scaffold3 5\n";
print EXPECTED "scaffold1 10\n";
close(EXPECTED);
$differences = "";
open(TEMP,"diff $scaffold_pos_file $expected_scaffold_pos_file |");
while(<TEMP>)
{
$line = $_;
$differences = $differences.$line;
}
close(TEMP);
$length_differences = length($differences);
if ($length_differences != 0) { print STDERR "ERROR: test_find_pos_of_scaffolds: failed test1 (files $scaffold_pos_file $expected_scaffold_pos_file)\n"; exit;}
# DELETE TEMPORARY FILES:
system "rm -f $input_fasta";
system "rm -f $scaffold_pos_file";
system "rm -f $expected_scaffold_pos_file";
}
#------------------------------------------------------------------#
# RECORD THE POSITIONS OF THE SCAFFOLDS IN $input_fasta:
sub find_pos_of_scaffolds
{
my $input_fasta = $_[0]; ## INPUT FILE OF SCAFFOLDS
my $outputdir = $_[1]; ## DIRECTORY WITH OUTPUT FILES
my $scaffold_pos_file; ## FILE OF POSITIONS OF SCAFFOLDS in $input_fasta
my $errorcode = 0; ## RETURNED AS 0 IF THERE IS NO ERROR
my $errormsg = "none";## RETURNED AS 'none' IF THERE IS NO ERROR
my $line; ##
my @temp; ##
my $line_no; ## LINE NUMBER THAT THE NAME OF A SCAFFOLD APPEARS ON
my $scaffold; ## SCAFFOLD IN $input_fasta
my $prev_scaffold = "none";## PREVIOUS SCAFFOLD IN $input_fasta
my $i; ##
# OPEN A FILE TO PUT THE POSITIONS OF SCAFFOLDS IN $input_fasta:
($scaffold_pos_file,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(SCAFFOLD_POS,">$scaffold_pos_file") || die "ERROR: find_pos_of_scaffolds: cannot open $scaffold_pos_file\n";
# FIND THE LINES THAT SEQUENCES START ON:
open(TMP,"grep -n \">\" $input_fasta |");
while(<TMP>)
{
$line = $_;
chomp $line;
@temp = split(/:/,$line);
$line_no = $temp[0] - 1; # THE LINE NUMBER FOR THE END OF THE PREVIOUS SCAFFOLD
$scaffold = "";
for ($i = 1; $i <= $#temp; $i++) { $scaffold = $scaffold.":".$temp[$i];}
$scaffold = substr($scaffold,2,length($scaffold)-2);
if ($prev_scaffold ne 'none')
{
print SCAFFOLD_POS "$prev_scaffold $line_no\n";
}
# RECORD THE PREVIOUS SCAFFOLD:
$prev_scaffold = $scaffold;
}
close(TMP);
# FIND THE LENGTH OF THE FILE, TO FIND THE LINE THAT THE LAST SCAFFOLD ENDS ON:
open(TMP,"wc $input_fasta |");
while(<TMP>)
{
$line = $_;
chomp $line;
@temp = split(/\s+/,$line);
$line_no = $temp[1]; # NUMBER OF LINES IN THE FILE
print SCAFFOLD_POS "$prev_scaffold $line_no\n";
}
close(TMP);
close(SCAFFOLD_POS);
return($scaffold_pos_file,$errorcode,$errormsg);
}
#------------------------------------------------------------------#
# RECORD THE POSITIONS OF THE HMMs IN $input_hmms:
sub find_pos_of_hmms
{
my $input_hmms = $_[0]; # INPUT FILE OF HMMs
my $outputdir = $_[1]; # DIRECTORY WITH OUTPUT FILES
my $hmm_pos_file; # FILE OF POSITIONS OF HMMs in $input_hmms
my $errorcode = 0; # RETURNED AS 0 IF THERE IS NO ERROR
my $errormsg = "none";# RETURNED AS 'none' IF THERE IS NO ERROR
my $line; #
my @temp; #
my $line_no; # LINE NUMBER THAT THE NAME OF A HMM APPEARS ON
my $family; # TREEFAM FAMILY FOR A HMM IN $input_hmms
my $prev_family = "none";# TREEFAM FAMILY FOR PREVIOUS HMM IN $input_hmms
my %TAKE_FAMILY = (); # HASH TABLE THAT SAYS WHETHER TO TAKE A PARTICULAR FAMILY
# OPEN A FILE TO PUT THE POSITIONS OF HMMs IN $input_hmms:
($hmm_pos_file,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(HMM_POS,">$hmm_pos_file") || die "ERROR: find_pos_of_hmms: cannot open $hmm_pos_file\n";
# FIND THE LINES THAT HMMs END ON:
open(TMP,"grep -n NAME $input_hmms |");
while(<TMP>)
{
$line = $_;
chomp $line;
@temp = split(/:/,$line);
$line_no = $temp[0] - 2; # THE LINE NUMBER FOR THE END OF THE PREVIOUS HMM
@temp = split(/\s+/,$line);
$family = $temp[1];
@temp = split(/\./,$family);
$family = $temp[0];
if ($prev_family ne 'none')
{
print HMM_POS "$prev_family $line_no\n";
$TAKE_FAMILY{$prev_family} = 1;
}
# RECORD THE PREVIOUS FAMILY:
$prev_family = $family;
}
close(TMP);
# FIND THE LENGTH OF THE FILE, TO FIND THE LINE THAT THE LAST HMM ENDS ON:
open(TMP,"wc $input_hmms |");
while(<TMP>)
{
$line = $_;
chomp $line;
@temp = split(/\s+/,$line);
$line_no = $temp[1]; # NUMBER OF LINES IN THE FILE
print HMM_POS "$prev_family $line_no\n";
$TAKE_FAMILY{$prev_family} = 1;
}
close(TMP);
close(HMM_POS);
return($hmm_pos_file,\%TAKE_FAMILY,$errorcode,$errormsg);
}
#------------------------------------------------------------------#
# TEST &run_genewise_on_scaffolds
sub test_run_genewise_on_scaffolds
{
my $outputdir = $_[0]; # DIRECTORY TO WRITE OUTPUT FILES TO
my $blast_path = $_[1]; # PATH TO THE FORMATDB AND BLASTALL EXECUTABLES
my $input_fasta; # INPUT FASTA FILE
my $errorcode; # RETURNED AS 0 BY A FUNCTION IF THERE IS NO ERROR
my $errormsg; # RETURNED AS 'none' BY A FUNCTION IF THERE IS NO ERROR
my $input_hmms; # INPUT FILE OF HMMs
my $fam_seqs; # INPUT FILE WITH SEQUENCES IN FAMILIES.
my $output; # OUTPUT FILE FOR GENEWISE OUTPUT
my $expected_output; # FILE CONTAINING THE EXPECTED CONTENT OF $output
my $differences; # DIFFERENCES BETWEEN $output AND $expected_output
my $length_differences; # LENGTH OF $differences
my $line; #
my $hmm_pos_file; # FILE WITH POSITION OF HMMs IN $input_hmms
my $formatdbfile; # OUTPUT FILE MADE BY formatdb
my $cmd; # COMMAND TO RUN
my $i; #
my $scaffold_pos_file; # FILE WITH POSITIONS OF SCAFFOLDS IN $input_fasta
my $TAKE_FAMILY; # HASH TABLE THAT SAYS WHETHER TO TAKE A FAMILY
my @temp; #
# DEFINE THE OUTPUT FILE NAME FOR GENEWISE OUTPUT:
($output,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
@temp = split(/\//,$output);
$output = $temp[$#temp];
# WRITE A FILE WITH THE INPUT SEQUENCES IN THE FAMILY:
($fam_seqs,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(FAM_SEQS,">$fam_seqs") || die "ERROR: test_run_genewise_on_scaffolds: cannot open $fam_seqs\n";
print FAM_SEQS "TF101001\n";
print FAM_SEQS ">At1g16330.1\n";
print FAM_SEQS "MLRDGNKQSKNNVRFVRKSIKTTVKTSLQNRSSLKKPPVGRSKSRSISSIPSSAVASTLSLPEKVETKCLEEDTQGESSSSGNKDPTTKVLDVTAKPKSKRRKSFTSLLVNGSKFDEKNGETTEPEKLPSIDDESNQLEVAEYVDDIYQFYWTAEALNPALGHYLSAHAEVSPVTRGILINWLIEVHFKFDLMHETLYLTMDLLDRYLSQVPIHKNEMQLIGLTALLLASKYEDYWHPRIKDLISISAESYT\n";
print FAM_SEQS "REQILGMERSMLKQLKFRLNAPTPYVFMLRFLKAAQSNKKLEQLAFYLIELCLVEYEALKYKPSLLCASAIYVARCTLHMTPVWTSLLNNHTHYNVSQMKDCSDMILRFHKAAKTGNLRVTYEKYINPDRSNVAVLKPLDKLPL\n";
print FAM_SEQS ">At1g20590.1\n";
print FAM_SEQS "MSFLAVHQIVRKKLQLVGVTALLLACKYEEVSVPVVDDLILISDKAYSRREVLDMEKLMANTLQFNFSLPTPYVFMKRFLKAAQSDKKLEILSFFMIELCLVEYEMLEYLPSKLAASAIYTAQCTLKGFEEWSKTCEFHTGYNEEQLLACARKMVAFHHKAGTGKLTGSTTHLSSFMLQEVNQLGFCFKGGKNYNKNLI\n";
print FAM_SEQS ">At1g20610.1\n";
print FAM_SEQS "MVRSDENSLGLIGSMSLQGGGVVGKIKTTATTGPTRRALSTINKNITEAPSYPYAVNKRSVSERDGICNKPPVHRPVTRKFAAQLADHKPHIRDEETKKPDSVSSEEPETIIIDVDESDKEGGDSNEPMFVQHTEAMLEEIEQMEKEIEMEDADKEEEPVIDIDACDKNNPLAAVEYIHDMHTFYKNFEKLSCVPPNYMDNQQDLNERMRGILIDWLIEVHYKFELMEETLYLTINVIDRFLAVHQIVRKKL\n";
print FAM_SEQS "QLVGVTALLLACKYEEVSVPVVDDLILISDKAYSRREVLDMEKLMANTLQFNFSLPTPYVFMKRFLKAAQSDKKLEILSFFMIELCLVEYEMLEYLPSKLAASAIYTAQCTLKGFEEWSKTCEFHTGYNEKQLLACARKMVAFHHKAGTGKLTGVHRKYNTSKFCHAARTEPAGFLI\n";
print FAM_SEQS ">At1g34460.1\n";
print FAM_SEQS "MAHYINIYGKRLFDIGLYLKTSVDLILQQQHVLMSQQKFTDISLCHREAPNPKLDLPDDNRLSPLTELEDIGQQSKTLGTAIHRKISEQKRVIESGSVASIVEHKRTNLSAIMATRANIPEQVRGAPLVDGLKIQNKNGAVKNRRALGDIGNLVSVPGVQGGKAQPPINRPITLSFRAQLLANAQLERKPINGDNKVPALGPKSQPLAARNPEAQRAVQKKNLVVKQQ\n";
print FAM_SEQS "TKPVEVIETKRNAQSKAACGIVNK\n";
print FAM_SEQS "PKILDIDESDKDNHVAAVEYVDDMYSFYKEVEKESQPKMYMHIQTEMNEKMRAILIDWLLEVHIKFELNLETLYLTVNIIDRFLYVKAVPKRELQVNDLVYVTDNAYSSRQILVMKKAILGNLEWYLTIPTQYVFLFCFIKASISDPEVLHVQKKNLQASKTKSFSIQVLSFSSHKSIVKSDQFCKKFNLCQEVTAPASEFHLGNCEAWRETVTKLKDPETKGSLVSRDFSSCKELLIKGFKMKEC\n";
print FAM_SEQS "LAAKKI\n";
print FAM_SEQS ">At1g47210.2\n";
print FAM_SEQS "MTEQEICVRVTRAAAKRKASTAMGIDGDRVNKKRVVLGELLNVSNVNLLANLNQKKETQKPKRNLKPPPAKQIKSAPVAIIDLESKSDIDSRSDDPQMCGPYVADIYEYLRQLEVKPKQRPLPDYIEKVQKDVTPSMRGVLVDWLVEVAEEYKLGSETLYLTVSHIDRFLSLKTVNKQKLQLVGVSAMLIASKYEEISPPKVDDFCYITDNTFSKQDVVKMEADILLALQFELGRPTINTFMRRFTRVAQDD\n";
print FAM_SEQS "FKVPHLQLEPLCCYLSELSILDYKTVKFVPSLLAASAVFLARFIIRPKQHPWNQMLEEYTKYKAADLQVCVGIIHDLYLSRRGGALQAVREKYKHHKFQCVATMPVSPELPVTFWEDVTI\n";
print FAM_SEQS ">At1g47220.1\n";
print FAM_SEQS "MVSKKDKQIHSDHNPQDASPVEWAEIRHKLLAFQENIQSGSDIDARSDDPQMCGLYVSDIYEYLRELEVKPKLRPLHDYIEKIQEDITPSKRGVLVDWLVEVAEEFELVSETLYLTVSYIDRFLSLKMVNEHWLQLVGVSAMFIASKYEEKRRPKVEDFCYITANTYTKQDVLKMEEDILLALEFELGRPTTNTFLRRFIRVAQEDFKVPNLQLEPLCCYLSELSMLDYSCVKFVPSLLAASAVFLARFIIL\n";
print FAM_SEQS "PNQHPWSQMLEECTKYKAADLQVCVEIMLDLYLSRSEGASKAVREKYKQHKFQYVAAIPVYQELPVTFWEDVVTI\n";
print FAM_SEQS ">At1g76310.1\n";
print FAM_SEQS "MGGSDENRHGVIGPMNRQQGGLRGGKVIPTNGQTRRALSNINKNIIGAPVYPCAVKRPFTEKNGICNKKIPPVPVHRPVTRKFAAQLAENNLQIHKEETKKPDLISNEALDRIITDVEEGDFNEPMFVQHTEAMLEEIDKMEGIEMQDSNDIDAEVEESVMDIDSCDKNNPLSVVEYINDIYCFYKKNECRSCVPPNYMENQHDINERMRGILFDWLIEVHYKFELMEETLYLTINLIDRFLAVHQHIARKK\n";
print FAM_SEQS "LQLVGVTAMLLACKYEEVSVPVVDDLILISDKAYTRTEILDMEKLMANTLQFNFCLPTPYVFMRRFLKAAQSDKKLELLSFFMIELCLVEYEMLQYTPSQLAASAIYTAQSTLKGYEDWSKTSEFHSGYTEEALLECSRKMVGLHHKAGTGKLTGVHRKYNTSKFGYAARIEPAGFLLL\n";
print FAM_SEQS ">At2g17620.1\n";
print FAM_SEQS "MVNSCENKIFVKPTSTTILQDETRSRKFGQEMKREKRRVLRVINQNLAGARVYPCVVNKRGSLLSNKQEEEEGCQKKKFDSLRPSVTRSGVEEETNKKLKPSVPSANDFGDCIFIDEEEATLDLPMPMSLEKPYIEADPMEEVEMEDVTVEEPIVDIDVLDSKNSLAAVEYVQDLYAFYRTMERFSCVPVDYMMQQIDLNEKMRAILIDWLIEVHDKFDLINETLFLTVNLIDRFLSKQNVMRKKLQLVGLV\n";
print FAM_SEQS "ALLLACKYEEVSVPVVEDLVLISDKAYTRNDVLEMEKTMLSTLQFNISLPTQYPFLKRFLKAAQADKKCEVLASFLIELALVEYEMLRFPPSLLAATSVYTAQCTLDGSRKWNSTCEFHCHYSEDQLMECSRKLVSLHQRAATGNLTGVYRKYSTSKFGYIAKCEAAHFLVSESHHS\n";
print FAM_SEQS ">At2g26760.1\n";
print FAM_SEQS "MASSRVSDLPHQRGIAGEIKPKNVAGHGRQNRKVLGDIGNLVTGRDVATGKDVAKKAKQPQQQTKAEVIVISPDENEKCKPHFSRRTHIRGTKTFTATLRARSKAASGLKDAVIDIDAVDANNELAAVEYVEDIFKFYRTVEEEGGIKDYIGSQPEINEKMRSILIDWLVDVHRKFELMPETLYLTINLVDRFLSLTMVHRRELQLLGLGAMLIACKYEEIWAPEVNDFVCISDNAYNRKQVLAMEKSILGQ\n";
print FAM_SEQS "VEWYITVPTPYVFLARYVKAAVPCDAEMEKLVFYLAELGLMQYPIVVLNRPSMLAASAVYAARQILKKTPFWTETLKHHTGYSEDEIMEHAKMLMKLRDSASESKLIAVFKKYSVSENAEVALLPSLDDFSVSCA\n";
print FAM_SEQS ">At3g11520.1\n";
print FAM_SEQS "MATGPVVHPQPVRGDPIDLKNAAAKNRRALGDIGNVDSLIGVEGGKLNRPITRNFRAQLLENAQVAAAANKKAPILDGVTKKQEVVRAVQKKARGDKREPSKPIEVIVISPDTNEVAKAKENKKKVTYSSVLDARSKAASKTLDIDYVDKENDLAAVEYVEDMYIFYKEVVNESKPQMYMHTQPEIDEKMRSILIDWLVEVHVKFDLSPETLYLTVNIIDRFLSLKTVPRRELQLVGVSALLIASKYEEIWP\n";
print FAM_SEQS "PQVNDLVYVTDNSYNSRQILVMEKTILGNLEWYLTVPTQYVFLVRFIKASGSDQKLENLVHFLAELGLMHHDSLMFCPSMLAASAVYTARCCLNKTPTWTDTLKFHTGYSESQLMDCSKLLAFIHSKAGESKLRGVLKKYSKLGRGAVALISPAKSLMSSAP\n";
print FAM_SEQS ">At4g35620.1\n";
print FAM_SEQS "MVNPEENNRNLVVKPITEILQDDDKRSRKFGVEMKRQNRRALGVINHNLVGAKAYPCVVNKRRGLSQRKQESCDKKKLDSLHPSISRSQEETKKLKPSGNEFGDCIFIDEEEEKNEEVTLDQPMPMSLEEPYIEFDPMEEEVEMEDMEEEQEEPVLDIDEYDANNSLAAVEYVQDLYDFYRKTERFSCVPLDYMAQQFDISDKMRAILIDWLIEVHDKFELMNETLFLTVNLIDRFLSKQAVARKKLQLVGL\n";
print FAM_SEQS "VALLLACKYEEVSVPIVEDLVVISDKAYTRTDVLEMEKIMLSTLQFNMSLPTQYPFLKRFLKAAQSDKKLEILASFLIELALVDYEMVRYPPSLLAATAVYTAQCTIHGFSEWNSTCEFHCHYSENQLLECCRRMVRLHQKAGTDKLTGVHRKYSSSKFGYIATKYEAAHFLVSDSH\n";
print FAM_SEQS ">At4g37490.1\n";
print FAM_SEQS "MMTSRSIVPQQSTDDVVVVDGKNVAKGRNRQVLGDIGNVVRGNYPKNNEPEKINHRPRTRSQNPTLLVEDNLKKPVVKRNAVPKPKKVAGKPKVVDVIEISSDSDEELGLVAAREKKATKKKATTYTSVLTARSKAACGLEKKQKEKIVDIDSADVENDLAAVEYVEDIYSFYKSVESEWRPRDYMASQPDINEKMRLILVEWLIDVHVRFELNPETFYLTVNILDRFLSVKPVPRKELQLVGLSALLMSAK\n";
print FAM_SEQS "YEEIWPPQVEDLVDIADHAYSHKQILVMEKTILSTLEWYLTVPTHYVFLARFIKASIADEKMENMVHYLAELGVMHYDTMIMFSPSMVAASAIYAARSSLRQVPIWTSTLKHHTGYSETQLMDCAKLLAYQQWKQQEEGSESSTKGALRKKYSKDERFAVALIPPAKALLTGTESA\n";
print FAM_SEQS ">At5g06150.1\n";
print FAM_SEQS "MATRANVPEQVRGAPLVDGLKIQNKNGAVKSRRALGDIGNLVSVPGVQGGKAQPPINRPITRSFRAQLLANAQLERKPINGDNKVPALGPKRQPLAARNPEAQRAVQKKNLVVKQQTKPVEVIETKKEVTKKEVAMSPKNKKVTYSSVLSARSKAACGIVNKPKIIDIDESDKDNHLAAVEYVDDMYSFYKEVEKESQPKMYMHIQTEMNEKMRAILIDWLLEVHIKFELNLETLYLTVNIIDRFLSVKAVP\n";
print FAM_SEQS "KRELQLVGISALLIASKYEEIWPPQVNDLVYVTDNAYSSRQILVMEKAILGNLEWYLTVPTQYVFLVRFIKASMSDPEMENMVHFLAELGMMHYDTLTFCPSMLAASAVYTARCSLNKSPAWTDTLQFHTGYTESEIMDCSKLLAFLHSRCGESRLRAVYKKYSKAENGGVAMVSPAKSLLSAAADWKKPVSS\n";
print FAM_SEQS ">At5g11300.1\n";
print FAM_SEQS "MYCSSSMHPNANKENISTSDVQESFVRITRSRAKKAMGRGVSIPPTKPSFKQQKRRAVLKDVSNTSADIIYSELRKGGNIKANRKCLKEPKKAAKEGANSAMDILVDMHTEKSKLAEDLSKIRMAEAQDVSLSNFKDEEITEQQEDGSGVMELLQVVDIDSNVEDPQCCSLYAADIYDNIHVAELQQRPLANYMELVQRDIDPDMRKILIDWLVEVSDDYKLVPDTLYLTVNLIDRFLSNSYIERQRLQLLG\n";
print FAM_SEQS "VSCMLIASKYEELSAPGVEEFCFITANTYTRPEVLSMEIQILNFVHFRLSVPTTKTFLRRFIKAAQASYKVPFIELEYLANYLAELTLVEYSFLRFLPSLIAASAVFLARWTLDQTDHPWNPTLQHYTRYEVAELKNTVLAMEDLQLNTSGCTLAATREKYNQPKFKSVAKLTSPKRVTSLFSR\n";
print FAM_SEQS ">At5g25380.1\n";
print FAM_SEQS "MHRASSKHTNAKKEAISTSKIRDNNVRVTRSRAKALGVSNSPSKPAFKHETKRVARPSNKRMASDNITVCNQKRRAVLKDVTNTLAESIISTEGNVKACKRGGKETKQIEEDGLVDVDGEKSKLAEDLSKIRMVESLDASASKQKEDRSDVTDCVQIVDIDSGVQDPQFCSLYAASIYDSINVAELEQRPSTSYMVQVQRDIDPTMRGILIDWLVEVSEEYKLVSDTLYLTVNLIDRFMSHNYIEKQKLQLL\n";
print FAM_SEQS "GITCMLIASKYEEISAPRLEEFCFITDNTYTRLEVLSMEIKVLNSLHFRLSVPTTKTFLRRFIRAAQASDKVPLIEMEYLANYFAELTLTEYTFLRFLPSLIAASAVFLARWTLDQSNHPWNQTLQHYTRYETSALKNTVLAMEELQLNTSGSTLIAIHTKYNQQKFKRVATLTSPERVNTLFSR\n";
print FAM_SEQS ">At5g43080.1\n";
print FAM_SEQS "MADEKENCVRMTRAATKRKASMEAAIDKERINKKRVVLGELPNLSNIKKSRKATTKQKKKSVSIPTIETLNSDIDTRSDDPQMCGPYVTSIFEYLRQLEVKSRPLVDYIEKIQKDVTSNMRGVLVDWLVEVAEEYKLLSDTLYLAVSYIDRFLSLKTVNKQRLQLLGVTSMLIASKYEEITPPNVDDFCYITDNTYTKQEIVKMEADILLALQFELGNPTSNTFLRRFTRVAQEDFEMSHLQMEFLCSYLSE\n";
print FAM_SEQS "LSMLDYQSVKFLPSTVAASAVFLARFIIRPKQHPWNVMLEEYTRYKAGDLKECVAMIHDLYLSRKCGALEAIREKYKQHKFKCVATMPVSPELPLTVFEDVNI\n";
print FAM_SEQS ">CBG05553\n";
print FAM_SEQS "MMMLRSQAKNVDPPADGRQHQKRKQAEQLDALKNPLEPVAKKQLSKGLTELRGHLSGFKIDSAKREQQGGKKNPSNNDDSENIAPGKAPYVDPCPHYDYDQEEAHNPDSVSEYAPEIFDYYKAREIQFQVLPYLARHPEIDVKTRAILIDWMVEIQETFELNHETLYNAVKLTDIFLHNSKNVDKNTIQKLACVTIFIAAKYDERSPPLVDDLIYLSGDRFTREELLAMERSLFSTVGYDLGSPLSYRYLRR\n";
print FAM_SEQS "LGRVCRVDMRSLTMARYILETSLMVYDYAFISQARQAAAAFVLAMRMMAKDHRYEWNPVLEKYSGFTGEEIYPLVEHMNHIMHFVTAKWTQLASVRQKYSHEVFFHVAEIPFLPDTLKAVNAHTYAPVPVFSYP\n";
print FAM_SEQS "#END\n";
close(FAM_SEQS);
# WRITE AN INPUT FASTA FILE:
($input_fasta,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(INPUT_FASTA,">$input_fasta") || die "ERROR: test_run_genewise_on_scaffolds: cannot open $input_fasta\n";
print INPUT_FASTA ">V:15395346..15397430\n";
print INPUT_FASTA "gaatgttattttcttatcaataagcacattttctatcaaacccagttcactttcaaattt\n";
print INPUT_FASTA "ttcaatcacttttttctgaacttttaagcatttttgtcgacagtgagaaatatcgccgac\n";
print INPUT_FASTA "cgtactccgaggcatgtgcgctccaccgaacggggggcaatttcaaatacaccccgcgag\n";
print INPUT_FASTA "acccaccaagagggcggcaatttccagtgttcaccatcgtttgccatttgctctctgctc\n";
print INPUT_FASTA "ccaaaaatcatcatttttttggtttcatcgcttcgcagtttccgtttaatattttgtctc\n";
print INPUT_FASTA "cattttccccactttcaatgtaatttatttcagtattttcagcattcaaaatgatgctgc\n";
print INPUT_FASTA "gaagccaggccaagaatgtcgacctgacttcacaaggtgagcggatttcctcgaaaacta\n";
print INPUT_FASTA "tttatagattttaaattttaatttacagcagattctcggcatcaacaaaaacgaaagcag\n";
print INPUT_FASTA "gctgagcaattggatgctctaaagaatccatcggaaccggcagccaagaagcaacacagc\n";
print INPUT_FASTA "aaggtagaacgaggattatcgattttttgggccttctcaaattaattgtttcagggtctc\n";
print INPUT_FASTA "accgagctccgcgcacacatctctggatttaaaatcgactcggcaaagcgagatccactg\n";
print INPUT_FASTA "ggaaagtcgagaacgagtagacgagacgtcgagaaccttccaccgcaaaagtccagatat\n";
print INPUT_FASTA "gttgatccgtgtcctcattacgattacgacctcgaggaggccggaaacccggacagtatc\n";
print INPUT_FASTA "tcggactatgctcaagggatttttgactactacagacaccgagaagttcactttcgagtg\n";
print INPUT_FASTA "agaaagtaccttcacaaacatccggaggttgacgtcaagactcgtgctatcctcattgac\n";
print INPUT_FASTA "tggatggttgagattcaggagacatttgagctcaaccacgagaccctttacaacgccgtt\n";
print INPUT_FASTA "aagctcacggatatgtacttgtgcaagacgaagaatgttgacaaaaacaccattcaggtg\n";
print INPUT_FASTA "agataaaatccaaagtagtctattatttttatcaataaattttcagaagcttgcatgtgt\n";
print INPUT_FASTA "cgccatcttcattgccgccaagtacgatgagcgatctccaccactcgtcgatgatctcat\n";
print INPUT_FASTA "ctacctttccggagatcgcttctcccgcgatgagcttcttgccatggagcgtgaactctt\n";
print INPUT_FASTA "cgccaccgtcggatatgatctcggctcaccactgagctatcggtatcttcgccgcttcgg\n";
print INPUT_FASTA "tcgtgtctgtcgtgtcgatatgaagacactcaccatgggacgcttcattctggagacatc\n";
print INPUT_FASTA "actgatggtctacgaatacgctatggtctcacaatcccgtcttgccgccgccgctttcgt\n";
print INPUT_FASTA "cttggccatgcgtatgctcgacaagaataatgagtacgagtggaatccagtgctcgagaa\n";
print INPUT_FASTA "gtattctggattcactggagaggaggtgatgccactggtggagcacatgaaccacattct\n";
print INPUT_FASTA "tcatttttcgaaggacaagtgggctcaactcacatccgttcgccagaagtattctcatga\n";
print INPUT_FASTA "gtgagtttttgcaaagaaatatcgatttttaatatttttttccagagtattcttccatgt\n";
print INPUT_FASTA "cgcctcgatcccaatgctcccggataccctcaaggttgtggattcccacacatatgctcc\n";
print INPUT_FASTA "agtcccaatgctctcatacccataactaatcctaatttattcccgtattggattctgaat\n";
print INPUT_FASTA "cccctctcaactgttcacccaccaaaactttcaaacgattgacacctatgcctcttttga\n";
print INPUT_FASTA "tatattttgtatacgtattgcaattctcttctgtattccatttaactcctgtcatctctc\n";
print INPUT_FASTA "acaaatacacatacgcaattttggcctgattttgttttttgcttttaaaaatctgaacat\n";
print INPUT_FASTA "attgcaaaatttctaccaatttttaaacacatttcgagctacgccaaaataaattatttt\n";
print INPUT_FASTA "tccggcaaattgtttattgatggtgtgatttcagattaatgactaatgtggagacttgaa\n";
print INPUT_FASTA "cttgatcggcgcaactttacaagcggtttttgtccttacagtgct\n";
for ($i = 1; $i <= 1000; $i++)
{
print INPUT_FASTA "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN\n";
}
print INPUT_FASTA "gaatgttattttcttatcaataagcacattttctatcaaacccagttcactttcaaattt\n";
print INPUT_FASTA "ttcaatcacttttttctgaacttttaagcatttttgtcgacagtgagaaatatcgccgac\n";
print INPUT_FASTA "cgtactccgaggcatgtgcgctccaccgaacggggggcaatttcaaatacaccccgcgag\n";
print INPUT_FASTA "acccaccaagagggcggcaatttccagtgttcaccatcgtttgccatttgctctctgctc\n";
print INPUT_FASTA "ccaaaaatcatcatttttttggtttcatcgcttcgcagtttccgtttaatattttgtctc\n";
print INPUT_FASTA "cattttccccactttcaatgtaatttatttcagtattttcagcattcaaaatgatgctgc\n";
print INPUT_FASTA "gaagccaggccaagaatgtcgacctgacttcacaaggtgagcggatttcctcgaaaacta\n";
print INPUT_FASTA "tttatagattttaaattttaatttacagcagattctcggcatcaacaaaaacgaaagcag\n";
print INPUT_FASTA "gctgagcaattggatgctctaaagaatccatcggaaccggcagccaagaagcaacacagc\n";
print INPUT_FASTA "aaggtagaacgaggattatcgattttttgggccttctcaaattaattgtttcagggtctc\n";
print INPUT_FASTA "accgagctccgcgcacacatctctggatttaaaatcgactcggcaaagcgagatccactg\n";
print INPUT_FASTA "ggaaagtcgagaacgagtagacgagacgtcgagaaccttccaccgcaaaagtccagatat\n";
print INPUT_FASTA "gttgatccgtgtcctcattacgattacgacctcgaggaggccggaaacccggacagtatc\n";
print INPUT_FASTA "tcggactatgctcaagggatttttgactactacagacaccgagaagttcactttcgagtg\n";
print INPUT_FASTA "agaaagtaccttcacaaacatccggaggttgacgtcaagactcgtgctatcctcattgac\n";
print INPUT_FASTA "tggatggttgagattcaggagacatttgagctcaaccacgagaccctttacaacgccgtt\n";
print INPUT_FASTA "aagctcacggatatgtacttgtgcaagacgaagaatgttgacaaaaacaccattcaggtg\n";
print INPUT_FASTA "agataaaatccaaagtagtctattatttttatcaataaattttcagaagcttgcatgtgt\n";
print INPUT_FASTA "cgccatcttcattgccgccaagtacgatgagcgatctccaccactcgtcgatgatctcat\n";
print INPUT_FASTA "ctacctttccggagatcgcttctcccgcgatgagcttcttgccatggagcgtgaactctt\n";
print INPUT_FASTA "cgccaccgtcggatatgatctcggctcaccactgagctatcggtatcttcgccgcttcgg\n";
print INPUT_FASTA "tcgtgtctgtcgtgtcgatatgaagacactcaccatgggacgcttcattctggagacatc\n";
print INPUT_FASTA "actgatggtctacgaatacgctatggtctcacaatcccgtcttgccgccgccgctttcgt\n";
print INPUT_FASTA "cttggccatgcgtatgctcgacaagaataatgagtacgagtggaatccagtgctcgagaa\n";
print INPUT_FASTA "gtattctggattcactggagaggaggtgatgccactggtggagcacatgaaccacattct\n";
print INPUT_FASTA "tcatttttcgaaggacaagtgggctcaactcacatccgttcgccagaagtattctcatga\n";
print INPUT_FASTA "gtgagtttttgcaaagaaatatcgatttttaatatttttttccagagtattcttccatgt\n";
print INPUT_FASTA "cgcctcgatcccaatgctcccggataccctcaaggttgtggattcccacacatatgctcc\n";
print INPUT_FASTA "agtcccaatgctctcatacccataactaatcctaatttattcccgtattggattctgaat\n";
print INPUT_FASTA "cccctctcaactgttcacccaccaaaactttcaaacgattgacacctatgcctcttttga\n";
print INPUT_FASTA "tatattttgtatacgtattgcaattctcttctgtattccatttaactcctgtcatctctc\n";
print INPUT_FASTA "acaaatacacatacgcaattttggcctgattttgttttttgcttttaaaaatctgaacat\n";
print INPUT_FASTA "attgcaaaatttctaccaatttttaaacacatttcgagctacgccaaaataaattatttt\n";
print INPUT_FASTA "tccggcaaattgtttattgatggtgtgatttcagattaatgactaatgtggagacttgaa\n";
print INPUT_FASTA "cttgatcggcgcaactttacaagcggtttttgtccttacagtgct\n";
close(INPUT_FASTA);
# WRITE AN INPUT FILE OF HMMs:
($input_hmms,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(INPUT_HMMS,">$input_hmms") || die "ERROR: test_run_genewise_on_scaffolds: cannot open $input_hmms\n";
print INPUT_HMMS "HMMER2.0 [2.3.2]\n";
print INPUT_HMMS "NAME TF101001\n";
print INPUT_HMMS "LENG 442\n";
print INPUT_HMMS "ALPH Amino\n";
print INPUT_HMMS "RF no\n";
print INPUT_HMMS "CS no\n";
print INPUT_HMMS "MAP yes\n";
print INPUT_HMMS "COM /software/ensembl/compara/hmmer-2.3.2/src/hmmbuild --amino /tmp/treefam/TF101001/hmmer.hmm /tmp/treefam/TF101001/TF101001.sto\n";
print INPUT_HMMS "NSEQ 41\n";
print INPUT_HMMS "DATE Wed Sep 12 16:30:05 2012\n";
print INPUT_HMMS "CKSUM 9556\n";
print INPUT_HMMS "XT -8455 -4 -1000 -1000 -8455 -4 -8455 -4 \n";
print INPUT_HMMS "NULT -4 -8455\n";
print INPUT_HMMS "NULE 595 -1558 85 338 -294 453 -1158 197 249 902 -1085 -142 -21 -313 45 531 201 384 -1998 -644 \n";
print INPUT_HMMS "HMM A C D E F G H I K L M N P Q R S T V W Y \n";
print INPUT_HMMS " m->m m->i m->d i->m i->i d->m d->d b->m m->e\n";
print INPUT_HMMS " -55 * -4742\n";
print INPUT_HMMS " 1 -411 970 176 -169 -2686 -3421 -2158 1227 25 12 1788 -634 -75 -1970 951 -2393 502 605 683 -2581 86\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9846 -10888 -894 -1115 -701 -1378 -55 * \n";
print INPUT_HMMS " 2 661 -3551 -1928 -525 -3871 -1382 649 -3621 219 -182 -2640 1302 -3147 737 427 1355 1064 -3172 -3734 -81 87\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9846 -10888 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 3 56 -3547 -1969 596 -3853 -3087 -1747 -946 -267 -941 -152 530 598 -92 1803 1201 560 -1070 -3738 -3064 88\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9877 -10919 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 4 -652 248 -2002 483 -3912 799 1730 -3657 -1367 -1603 1703 1895 -3217 638 -392 504 925 -3217 -3788 -3110 89\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9926 -10969 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 5 -426 -3582 -501 -600 -3886 -1353 459 439 1009 -236 1354 1538 -795 502 -1880 409 161 -594 -3775 -55 90\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9926 -10969 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 6 -2261 -2850 -2680 -660 502 -1112 -16 1171 908 -1326 493 -691 -970 -1907 1938 446 -2201 714 -3212 -85 91\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 7 -38 -3625 -2014 -431 -3942 -30 -1798 226 572 -2021 -2715 809 -811 1199 1733 701 -599 214 -3811 -3131 92\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 8 -753 -3448 679 -1566 -3689 -733 378 1633 -1475 -1083 274 1297 -729 1415 -825 348 265 -147 -3681 -3050 93\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 9 1267 -3484 -508 863 -913 -1830 -1844 -1024 -1454 -781 756 -267 1444 627 87 -953 127 289 -3707 -3067 94\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 10 -1207 631 31 1780 -3950 -1130 -1796 -3699 1189 -921 -79 1723 -3230 -54 -1884 798 -666 -572 -3815 -3134 95\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 11 -1168 -3635 0 1058 -3957 -1035 266 -3707 14 -954 -2725 2843 -811 857 -296 -250 86 -3258 -3819 -3136 96\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 12 -305 -3633 452 288 -3953 -3137 1206 -233 322 -387 -2722 1524 347 558 -657 232 77 505 -3817 -3135 97\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -24 -9947 -6003 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 13 493 649 996 386 -3929 -1350 -1778 287 -340 -2268 -2701 819 -696 1420 166 -850 -51 957 -3796 -3115 98\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -25 -9925 -5981 -894 -1115 -1060 -942 * * \n";
print INPUT_HMMS " 14 -797 -3421 -2073 -474 -609 503 -1817 -876 1124 -246 -2530 130 1088 572 -1925 1027 272 180 -3651 -3018 99\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 15 -266 -3599 999 311 -3919 1107 -1759 -768 1398 -3615 -2688 1069 -3193 679 -1846 380 561 -1102 -3782 -3099 100\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 16 -2138 -3469 -2044 109 -3734 493 1736 413 1266 -1583 1048 435 595 33 -1902 -124 -355 142 -3687 706 101\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -40 -9903 -5267 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 17 512 -2322 -3689 -104 -2300 -3701 -2512 1670 -959 248 -164 -443 -3762 -154 -2991 -1010 -2227 2329 -2758 -2383 102\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9865 -10908 -894 -1115 -1722 -521 * * \n";
print INPUT_HMMS " 18 823 -3566 216 192 -3887 1011 -1728 -3637 -274 -179 -213 1443 -1585 1052 -590 -246 -173 -1385 -3750 -8 103\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -99 -9865 -3937 -894 -1115 -1722 -521 * * \n";
print INPUT_HMMS " 19 527 -3489 858 -320 -3810 1305 663 -1065 923 -1481 -2579 1074 -3084 636 588 -275 -1956 -814 -3673 -2990 104\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9769 -10811 -894 -1115 -2369 -310 * * \n";
print INPUT_HMMS " 20 652 -3464 591 319 -416 -1224 563 -1154 2223 -1418 -2557 -185 -3090 -1201 -1748 974 -1958 -510 -3655 -2979 105\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9769 -10811 -894 -1115 -2369 -310 * * \n";
print INPUT_HMMS " 21 -1077 -3492 -597 -463 -3813 783 631 -3564 2084 -1426 -2581 1918 -587 701 1152 -1899 -1958 -3114 -3675 -2992 106\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9769 -10811 -894 -1115 -2369 -310 * * \n";
print INPUT_HMMS " 22 733 545 -2069 -1518 -3347 -1357 2024 -3011 291 -3116 -2283 -1797 818 -1368 359 411 1614 401 -3426 828 107\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -50 -9769 -4931 -894 -1115 -2369 -310 * * \n";
print INPUT_HMMS " 23 725 -3403 -1852 -233 -3701 -2966 466 497 197 -1331 -436 -43 -982 1984 722 554 -656 582 -3599 -2930 108\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -59 -9722 -4677 -894 -1115 -2593 -261 * * \n";
print INPUT_HMMS " 24 564 -3029 -2018 -1466 -3204 -893 783 -1104 866 428 -2159 -1739 788 -423 -420 993 712 515 -3307 -2727 109\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -115 -9665 -3726 -894 -1115 -2815 -221 * * \n";
print INPUT_HMMS " 25 -1853 -3289 -1714 -1165 -3596 -8 1424 -97 1149 -3299 -2382 -328 -2924 258 1278 854 1775 -293 -3481 -2808 110\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -230 -9553 -2774 -894 -1115 -3156 -172 * * \n";
print INPUT_HMMS " 26 12 -3143 -1519 90 -3464 -989 -1304 -713 1791 -3159 -2232 1308 1140 481 -25 823 99 -2765 -3327 -2644 111\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -35 -9326 -5474 -894 -1115 -3620 -122 * * \n";
print INPUT_HMMS " 27 144 -2356 -112 -1546 1234 -86 -1605 -144 -46 486 -1518 -1748 -263 -1339 -97 1622 -702 -666 -2711 -2226 112\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -161 -9294 -3263 -894 -1115 -3669 -118 * * \n";
print INPUT_HMMS " 28 -277 -2934 -1413 212 -3224 641 -1184 -2953 240 -1363 951 1100 -306 -734 -1279 1975 27 -1135 -3136 -2472 113\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -127 -9136 -3601 -894 -1115 -3880 -101 * * \n";
print INPUT_HMMS " 29 253 -2226 -1796 -1240 -2317 -2640 1147 778 -1126 -1173 -1382 370 -228 341 -1544 1958 919 -347 -2567 -2062 114\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -45 -9014 -5133 -894 -1115 -4013 -92 * * \n";
print INPUT_HMMS " 30 -1417 -2884 -1264 673 -3202 -239 -1050 -262 406 -2898 -1974 1224 17 599 -1139 1765 1105 -2504 -3069 -2387 115\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -8973 -10015 -894 -1115 -4052 -90 * * \n";
print INPUT_HMMS " 31 -118 -1719 -2582 -2009 478 -581 -1663 -1273 470 1081 1743 -2029 -103 -1661 974 207 167 241 -2138 -1739 116\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -8973 -10015 -894 -1115 -4052 -90 * * \n";
print INPUT_HMMS " 32 -81 -2884 -1262 343 -3203 -533 -1047 -2953 1441 -821 -1973 421 -793 2172 407 -50 164 -297 -3068 -2386 117\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -99 -8973 -3952 -894 -1115 -4052 -90 * * \n";
print INPUT_HMMS " 33 513 -2814 -1199 908 -3131 1218 -984 -156 -566 -2828 -1904 1306 580 836 800 -25 -1290 -2434 -3000 -2319 118\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -341 -8878 -2264 -894 -1115 -4135 -85 * * \n";
print INPUT_HMMS " 34 1296 -1851 -1518 -962 -1931 422 1520 383 510 -828 -1011 692 -2412 -761 -1251 27 -1121 973 -2200 -1706 119\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -61 -8544 -4690 -894 -1115 -4363 -72 * * \n";
print INPUT_HMMS " 35 -1202 -2360 -1198 -633 -2584 -2217 -861 -2252 1325 81 -1481 -908 1698 1067 656 275 -1135 935 -2594 -2005 120\n";
print INPUT_HMMS " - -146 -507 230 41 -384 398 99 -627 210 -466 -727 275 392 52 97 363 119 -362 -301 -256 \n";
print INPUT_HMMS " - -950 -1056 -9531 -3332 -151 -44 -5070 * * \n";
print INPUT_HMMS " 36 -792 -3632 -2011 280 -3952 -395 1292 -1182 2273 -3648 17 -247 -15 1668 764 -2043 -975 -168 -3816 -3134 142\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 37 -1031 -3653 -2030 158 -3977 -3155 66 -3726 2113 -3668 -2743 1484 1764 -1350 1567 -602 -178 -3277 -3833 -3154 143\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 38 -4933 -5397 -6207 -4292 -354 -5364 -3082 -5461 724 -1299 -4469 -4045 -5251 -2697 3955 -4815 -4533 -5349 -4799 -4552 144\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 39 503 -3625 -2016 -1467 -3941 -3140 1201 -3688 1075 -3639 -626 380 -1164 -55 1841 730 1173 346 -3811 -3132 145\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 40 2598 -2588 -3805 -3253 -2686 -1355 -2770 -649 -3044 -2567 -1891 -1297 -1198 -216 -3203 -1619 -714 2112 -3127 -2747 146\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 41 -864 -2444 -4869 -4252 2041 -4143 -3019 -1827 -701 2669 -1539 -856 -4190 -3484 -3655 -3237 -2553 -103 -2881 -2533 147\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 42 -2246 -3721 300 1452 -4041 2544 -1871 -3793 -53 -3737 -2815 -1826 -3299 -1414 -693 838 -603 -1182 -3906 -3219 148\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 43 -2540 -4040 3030 1760 -4344 -3371 -2135 -4105 -1784 -4049 -3144 1085 -948 26 -2316 -2399 -943 -566 1371 -3515 149\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 44 -3862 -3461 -6392 -5932 -3731 -5948 -5228 3035 -5696 811 -2622 -760 -5820 -1424 -5641 -5167 -3832 2185 -4882 -4509 150\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -100 -9947 -3924 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 45 -2183 -3560 -2041 -1525 -3912 1912 -191 -3644 -444 -2152 -2719 1753 337 -1407 -1942 566 2015 -3216 -3817 -3156 151\n";
print INPUT_HMMS " - -150 -501 232 43 -382 398 108 -624 212 -467 -721 279 393 46 95 360 116 -368 -295 -250 \n";
print INPUT_HMMS " - -513 -1877 -5220 -27 -5766 -274 -2532 * * \n";
print INPUT_HMMS " 46 -898 -5770 -215 -2255 -6055 -4029 -3320 -5942 -688 -5816 -5099 4098 -4528 -323 -4168 -1085 -4041 -5417 -5997 -5050 153\n";
print INPUT_HMMS " - -149 -500 233 43 -381 398 105 -627 210 -466 -721 279 395 45 96 359 117 -370 -295 -250 \n";
print INPUT_HMMS " - -71 -4965 -5967 -1496 -632 -441 -1925 * * \n";
print INPUT_HMMS " 47 1465 -2262 -4310 -3699 -216 -1932 -2714 522 717 961 703 -3373 -989 1417 -586 -2931 -2306 920 -2712 -2360 157\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9925 -10967 -894 -1115 -1060 -942 * * \n";
print INPUT_HMMS " 48 -264 -3457 -569 -1531 -3710 -248 2089 194 -360 -1367 -2565 -333 -796 78 -1935 1132 -208 1858 -3683 -3045 158\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9925 -10967 -894 -1115 -1060 -942 * * \n";
print INPUT_HMMS " 49 -201 -362 308 65 -3938 -89 1110 -1055 1256 -3633 -2706 949 -3211 1040 857 397 399 -418 -3800 -3118 159\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9925 -10967 -894 -1115 -1060 -942 * * \n";
print INPUT_HMMS " 50 587 412 -2168 519 -3528 27 -1879 -314 409 -452 -2446 1906 -3294 -607 -2003 282 345 681 -3583 -2981 160\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -47 -9925 -5012 -894 -1115 -1060 -942 * * \n";
print INPUT_HMMS " 51 -1168 -3564 -1965 195 -3877 -3087 -1746 61 837 -1026 -2655 1299 1994 1813 1071 -1108 -2049 -846 -3752 -3074 161\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -48 -9880 -4980 -894 -1115 -1586 -585 * * \n";
print INPUT_HMMS " 52 60 -3523 -444 -378 -3834 1183 -1709 -914 -542 -740 -2614 -602 -4 1163 -317 796 -93 842 -3712 -180 162\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9835 -10877 -894 -1115 -1035 -966 * * \n";
print INPUT_HMMS " 53 -922 1618 -2659 -533 -2827 -3394 455 104 -35 859 -1935 -374 128 -484 -871 -864 -329 1621 -3136 1400 163\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9880 -10922 -894 -1115 -1586 -585 * * \n";
print INPUT_HMMS " 54 281 -3568 -506 -413 -3883 -3085 -1744 -822 378 -1689 -2658 934 2283 2094 -1833 -786 -377 -156 -3754 -3075 164\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9880 -10922 -894 -1115 -1586 -585 * * \n";
print INPUT_HMMS " 55 356 1812 -520 14 -752 -230 -1770 -909 200 -893 758 1438 767 643 -364 -1267 48 -652 -3695 -451 165\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -47 -9880 -5011 -894 -1115 -1586 -585 * * \n";
print INPUT_HMMS " 56 1350 -3435 -1989 -1440 -3712 1635 -1749 -69 1825 -3435 -2543 462 -1457 201 -1847 -235 -2029 -455 -3654 -3003 166\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -118 -9836 -3690 -894 -1115 -1959 -429 * * \n";
print INPUT_HMMS " 57 -1988 1088 -1881 956 -3624 -2980 624 -579 2343 -3345 -420 -8 -3072 -1199 673 76 -845 1000 -3559 -2905 167\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -104 -9720 -3869 -894 -1115 -2599 -260 * * \n";
print INPUT_HMMS " 58 -116 -3369 -658 747 -3690 -2872 -1531 -3440 2239 -812 -2459 1920 646 -1071 -31 -332 -1837 -1204 -3553 -2871 168\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -57 -9619 -4750 -894 -1115 -2969 -197 * * \n";
print INPUT_HMMS " 59 607 238 -184 1508 -3645 -2829 -1488 -765 1373 -1981 -2415 55 773 1841 -349 -1736 -684 -1512 -3509 -2827 169\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -97 -9565 -3979 -894 -1115 -3124 -176 * * \n";
print INPUT_HMMS " 60 190 -3255 511 -69 -3576 -45 966 -3327 676 -3271 165 744 700 -229 1184 703 584 -2877 -3439 -2756 170\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -616 -9471 -1530 -894 -1115 -3348 -149 * * \n";
print INPUT_HMMS " 61 -73 -2789 536 -642 -100 -552 -972 477 1452 -2801 995 924 17 677 160 -168 223 -2406 -2977 -2299 171\n";
print INPUT_HMMS " - -154 -492 231 45 -377 395 99 -626 220 -465 -727 281 394 48 93 362 113 -367 -301 -256 \n";
print INPUT_HMMS " - -1010 -1212 -3798 -3050 -186 -233 -2744 * * \n";
print INPUT_HMMS " 62 -653 -3497 310 785 -552 -1256 -1675 -320 1500 -836 -69 -130 801 -178 278 526 -1979 194 -3684 -3005 191\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9795 -10837 -894 -1115 -2222 -348 * * \n";
print INPUT_HMMS " 63 -74 406 767 -1635 393 -1058 821 1002 1145 -203 -2193 310 -1560 -1473 395 -211 -1090 402 -3351 -2791 192\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9795 -10837 -894 -1115 -2222 -348 * * \n";
print INPUT_HMMS " 64 200 240 -360 -1341 574 -430 2490 -3569 615 -3518 -2593 570 -1173 1000 201 777 -1978 746 -3689 -3008 193\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9795 -10837 -894 -1115 -2222 -348 * * \n";
print INPUT_HMMS " 65 -414 -3510 -1887 652 -3830 -1634 -1671 -1689 2011 -577 -2599 -812 425 114 1375 54 1011 -3131 -3693 -3011 194\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9795 -10837 -894 -1115 -1557 -599 * * \n";
print INPUT_HMMS " 66 -2074 -3529 -1921 -307 -3844 -1184 1420 -3589 1136 -3543 -2622 -170 2082 -1252 -1798 781 1588 512 -3718 -3039 195\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9826 -10868 -894 -1115 -2029 -406 * * \n";
print INPUT_HMMS " 67 -265 330 -387 -239 -3828 -3042 -1701 513 1888 -1425 -2608 -150 -1147 295 31 436 526 790 -3705 -3028 196\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9826 -10868 -894 -1115 -1512 -623 * * \n";
print INPUT_HMMS " 68 550 -2518 -423 -707 361 -352 -2270 198 -2309 -975 -1700 -414 -3581 -2175 -2601 760 2098 1036 -2923 -2502 197\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9848 -10890 -894 -1115 -1868 -462 * * \n";
print INPUT_HMMS " 69 -805 -3547 221 -637 -3865 -3058 -1716 -3613 2598 -1415 -2637 1041 -1571 -1258 1767 -1964 -492 -963 1395 -3052 198\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9848 -10890 -894 -1115 -1868 -462 * * \n";
print INPUT_HMMS " 70 2 -3554 -477 -384 -533 -3055 792 -3625 1732 -2150 -2643 644 815 52 368 885 777 -1032 -3737 -3054 199\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -122 -9848 -3643 -894 -1115 -509 -1750 * * \n";
print INPUT_HMMS " 71 -757 -3075 -2197 119 1645 257 1481 547 -548 -443 -2211 -1908 158 -32 -363 564 241 220 -3369 -2808 200\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9812 -10854 -894 -1115 -2121 -377 * * \n";
print INPUT_HMMS " 72 127 -3517 -972 154 -3835 -3028 -1686 1000 1584 -899 -2607 675 -114 80 1818 -675 -1992 -476 -3703 -3022 201\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9812 -10854 -894 -1115 -1426 -672 * * \n";
print INPUT_HMMS " 73 1151 -3551 -658 713 -3872 -1515 -1710 -3622 1222 -757 -2640 -1687 5 1063 1693 552 -1186 -3173 -3734 -3051 202\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9844 -10886 -894 -1115 -1899 -450 * * \n";
print INPUT_HMMS " 74 528 -3551 -326 -380 -3872 351 -1710 -3622 547 -1940 -2640 435 -1456 2314 359 932 -581 -229 -3734 -3051 203\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9844 -10886 -894 -1115 -772 -1271 * * \n";
print INPUT_HMMS " 75 -1744 -2780 -5380 -4764 1230 -4640 -3536 753 -4386 2060 1242 -4289 -4624 -3968 -4183 -3745 1179 1429 -3301 -3001 204\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 76 619 -3599 261 720 -3920 -1045 1509 -3670 1657 -211 -2688 -1735 12 682 -404 252 29 -1510 -3782 -3099 205\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 77 816 -3599 -697 1454 -3920 -1498 -1758 -824 1330 -3615 -2688 522 1038 -16 -22 133 -731 -1102 -3782 -38 206\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 78 467 -3599 643 580 -3920 -3100 1060 -3670 394 -1194 -2688 1485 -3193 774 -370 1127 369 -251 -3782 -3099 207\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 79 879 -3587 1000 -683 -3902 -513 -1762 -286 -116 -1358 -2677 1579 -1505 856 -1851 919 -562 539 -3773 -3094 208\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 80 -280 -2310 -3914 -3321 -2281 -3775 -2599 1645 -337 792 1112 32 -119 1064 -3122 118 -571 1308 -2751 -2385 209\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 81 20 -3578 50 -576 -3889 -3105 204 735 1126 306 -2670 -294 -1261 1229 -181 -169 -731 847 -3767 -126 210\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 82 -892 -3581 -1982 1073 -3894 -3104 -1764 229 1759 -965 -2672 465 1836 -19 69 -968 159 -847 -3769 -3091 211\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 83 -192 -3599 884 1411 -3920 -3100 205 529 1730 -3615 -2688 835 -812 385 583 -780 -2065 -714 -3782 -3099 212\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 84 -121 -3599 -697 1784 -3920 -3100 87 -1384 664 -3615 -2688 1296 1318 714 -370 -803 17 -649 -3782 118 213\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 85 -415 -3599 1417 1609 -3920 -3100 -1758 -3670 532 -1396 -2688 307 776 361 -404 400 301 -149 -3782 -3099 214\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 86 807 -314 -452 441 -3867 -934 -1769 395 191 -807 165 -296 51 -326 759 433 8 527 -3756 -3083 215\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 87 109 -3596 733 -84 -275 -3100 -1759 -3666 1442 -1361 -2686 1721 805 -115 -1847 366 899 -1488 -3780 -3098 216\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 88 71 292 -2967 657 -2642 -1049 -2268 681 1927 276 475 -2521 -701 -2131 -652 -196 -2199 912 -3014 -2582 217\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9903 -10945 -894 -1115 -1348 -720 * * \n";
print INPUT_HMMS " 89 530 -3599 -415 260 -3920 -435 -1758 -3671 1932 -1324 -2688 1169 1022 59 870 -897 -938 -3221 -3782 -236 218\n";
print INPUT_HMMS " - -197 -493 191 93 -373 330 130 -627 301 -436 -643 242 408 56 44 370 156 -366 -348 -310 \n";
print INPUT_HMMS " - -5067 -2315 -378 -6807 -13 -1348 -720 * * \n";
print INPUT_HMMS " 90 -1183 2447 -3481 -2903 -990 -2737 -1788 35 -2541 1696 -132 -2435 985 -2188 -2396 -1864 -1160 1900 -1652 -1320 624\n";
print INPUT_HMMS " - -149 -500 232 42 -378 398 105 -624 213 -467 -721 277 393 45 95 360 117 -368 -295 -250 \n";
print INPUT_HMMS " - -2954 -203 -8832 -35 -5397 -3094 -180 * * \n";
print INPUT_HMMS " 91 -891 -2362 764 730 -2683 -1863 2542 -2433 754 -2378 -1452 1024 465 -63 789 349 -830 -543 -2546 -1863 626\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -8 -8154 -9196 -894 -1115 -3784 -109 * * \n";
print INPUT_HMMS " 92 -1021 -2014 -1053 557 -2180 -2064 -772 323 -461 -235 -1161 1639 1867 -398 -923 1096 -965 -1551 -2315 -1748 627\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -7 -8263 -9305 -894 -1115 -3538 -130 * * \n";
print INPUT_HMMS " 93 114 -2091 321 119 -2258 -2116 -799 211 -472 -341 1463 866 -2204 -415 -939 1712 375 -1628 -2374 -1800 628\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -6 -8401 -9443 -894 -1115 -2357 -313 * * \n";
print INPUT_HMMS " 94 -53 -2745 316 1417 -3057 -503 -928 -2802 579 -2757 -1836 -905 403 -471 -1018 1385 -1231 619 -2933 606 629\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -5 -8790 -9832 -894 -1115 -2830 -219 * * \n";
print INPUT_HMMS " 95 -1503 -2425 -1585 1441 -2596 473 -1293 -153 -1009 -2394 -1600 170 791 -937 -1464 453 -1454 1987 -2763 -2211 630\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -8949 -9991 -894 -1115 -2993 -194 * * \n";
print INPUT_HMMS " 96 -225 -3138 848 1211 -3454 -2568 -1297 -3204 -922 -3160 -2251 371 1161 -850 -1442 1855 -1624 853 -3340 -2648 631\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -9051 -10093 -894 -1115 -3975 -95 * * \n";
print INPUT_HMMS " 97 -136 -2917 -1328 552 -247 -2449 -1108 -2970 930 -176 -2009 363 1290 680 -1199 1511 28 -2533 -3107 -2431 632\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -9051 -10093 -894 -1115 -2984 -195 * * \n";
print INPUT_HMMS " 98 -1536 -2924 -1418 594 -170 -750 -1186 -646 1248 553 -2022 -1173 1449 631 183 427 13 -2527 -3128 -2467 633\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -9135 -10177 -894 -1115 -3882 -101 * * \n";
print INPUT_HMMS " 99 -461 1243 1155 1373 -3321 -403 -1163 -3072 1272 -993 -2091 -1140 -311 650 -1251 842 114 -2623 -3185 -2503 634\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -9135 -10177 -894 -1115 -3882 -101 * * \n";
print INPUT_HMMS " 100 -1530 862 119 1554 -3316 -2505 1903 -439 254 -3012 -2087 790 1470 1283 -1252 -1412 -135 -2618 1656 -2501 635\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -9135 -10177 -894 -1115 -2755 -231 * * \n";
print INPUT_HMMS " 101 265 -2898 -213 1904 -3145 -2620 -1288 325 1539 -120 -2007 -1288 -249 -856 -1395 -295 -1554 218 -3127 -2492 636\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -9230 -10273 -894 -1115 -3761 -111 * * \n";
print INPUT_HMMS " 102 689 -2324 713 -1477 655 -2832 -1546 75 -132 -141 -1484 -1683 -226 404 -1761 939 1387 -289 -2676 -2186 637\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -9230 -10273 -894 -1115 -3761 -111 * * \n";
print INPUT_HMMS " 103 -457 -2676 -1691 546 -2846 85 995 888 -1041 -1112 -1807 -1411 -2776 1992 21 -258 -26 1334 -2957 -2380 638\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -9230 -10273 -894 -1115 -3761 -111 * * \n";
print INPUT_HMMS " 104 -304 -3067 1378 72 950 -425 -1234 -744 1505 -3082 727 998 -112 -775 711 -277 -1539 -2688 -3252 -2571 639\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -9230 -10273 -894 -1115 -3244 -161 * * \n";
print INPUT_HMMS " 105 -391 782 798 1350 893 -2632 -1297 -720 49 252 -2069 -1292 -274 464 -138 -246 698 -1216 -3183 -2537 640\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9264 -10306 -894 -1115 -2411 -301 * * \n";
print INPUT_HMMS " 106 193 -3111 1094 1377 -3402 -2696 934 583 1521 -312 -2208 -1343 -2789 55 -1453 -334 -1650 -659 1384 -2648 641\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9371 -10413 -894 -1115 -3073 -183 * * \n";
print INPUT_HMMS " 107 543 -3161 21 502 -502 -2709 -1369 687 1467 -1122 -2255 73 -414 1504 -1461 230 -1668 13 -3355 -2682 642\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9398 -10440 -894 -1115 -3495 -134 * * \n";
print INPUT_HMMS " 108 -1751 832 -354 463 -3124 -2779 -1452 211 603 -204 -2037 -1471 -2868 1229 20 -378 407 1903 -3172 -2565 643\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9398 -10440 -894 -1115 -2830 -219 * * \n";
print INPUT_HMMS " 109 -801 -3230 1599 1274 -3551 -2730 -1389 -3302 1184 -181 -2319 186 -1137 622 -80 724 322 -2852 -3413 -2730 644\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9438 -10480 -894 -1115 -3418 -142 * * \n";
print INPUT_HMMS " 110 -523 -3180 372 1163 -3479 -2743 -1403 152 -391 -892 -334 1249 545 -951 -41 976 -185 391 -3377 -2708 645\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9438 -10480 -894 -1115 -2892 -209 * * \n";
print INPUT_HMMS " 111 -376 -3226 406 2305 -3535 -2759 862 -682 -80 -1179 551 -1399 -2852 383 1155 -1667 212 -427 -3416 -2741 646\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9467 -10509 -894 -1115 -3357 -148 * * \n";
print INPUT_HMMS " 112 -130 -3249 93 2539 -3569 78 -1412 -731 -130 -1187 -2339 -1389 375 749 -103 -1660 -145 -2871 -3433 -2751 647\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9467 -10509 -894 -1115 -2037 -403 * * \n";
print INPUT_HMMS " 113 246 956 -434 1348 -907 512 -1853 -13 -1704 544 -1680 -2017 -865 189 -2088 87 190 412 -2880 -2406 648\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9563 -10605 -894 -1115 -2659 -249 * * \n";
print INPUT_HMMS " 114 56 -3345 1339 1316 -3666 -1078 -1505 -3417 1060 -1999 -2435 -1481 1103 -1045 935 632 103 -2967 -3529 -2846 649\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9586 -10629 -894 -1115 -3064 -184 * * \n";
print INPUT_HMMS " 115 751 -3049 -237 -337 567 -1093 -1606 -2923 -1249 -705 -2171 -1627 1943 -1198 508 1013 315 -65 -3308 -2705 650\n";
print INPUT_HMMS " - -151 -503 229 41 -384 397 110 -622 217 -461 -717 272 393 47 94 359 122 -373 -298 -253 \n";
print INPUT_HMMS " - -50 -4914 -10629 -4891 -49 -1932 -439 * * \n";
print INPUT_HMMS " 116 -935 1136 2187 213 -326 -2921 650 -3344 1353 -1488 -2425 -278 -3013 -1134 -1678 709 -1873 871 -3531 -2868 687\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9657 -10699 -894 -1115 -2842 -217 * * \n";
print INPUT_HMMS " 117 -89 700 106 942 -407 -962 714 -3468 389 -1611 -2487 -47 -576 1234 -1649 1517 23 -565 -3582 -2900 688\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9657 -10699 -894 -1115 -2842 -217 * * \n";
print INPUT_HMMS " 118 279 -3399 898 245 -3720 -926 703 -493 1227 -1228 -2489 -267 2187 -1101 -845 57 -696 -3021 -3583 -2901 689\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9657 -10699 -894 -1115 -2842 -217 * * \n";
print INPUT_HMMS " 119 -619 -3400 898 1297 -3721 -2901 -1560 -3471 900 -1508 1567 -419 -357 225 460 1383 -364 -1234 -3584 -2901 690\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9657 -10699 -894 -1115 -2842 -217 * * \n";
print INPUT_HMMS " 120 -1949 -3418 -1789 -237 -696 11 -1576 -3489 388 -3433 -2508 844 2967 920 276 121 -1887 -3041 -3599 -2919 691\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9657 -10699 -894 -1115 -2842 -217 * * \n";
print INPUT_HMMS " 121 -308 -1983 -4458 -874 -169 -3694 -2563 1949 -3428 801 2279 -3328 -1001 -3058 -601 -862 294 1298 -2440 -2097 692\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9657 -10699 -894 -1115 -2842 -217 * * \n";
print INPUT_HMMS " 122 -935 -3326 -1814 437 -682 -929 650 -3341 418 -1194 -2424 -1570 1709 1673 -1679 1177 -356 62 -3529 51 693\n";
print INPUT_HMMS " - -159 -561 197 165 -320 305 84 -634 248 -383 -651 256 366 55 23 379 152 -400 -388 -332 \n";
print INPUT_HMMS " - -2327 -3271 -520 -8400 -4 -2842 -217 * * \n";
print INPUT_HMMS " 123 -1048 -905 -3157 -2548 -832 -2584 -1475 -173 -2201 543 2885 -2159 807 -1868 -2092 -1668 1538 1558 -1399 -1060 1241\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -9 -7937 -8979 -894 -1115 -4617 -60 * * \n";
print INPUT_HMMS " 124 -877 -841 -2522 456 -802 -2334 -1163 991 -1656 447 1844 -1728 -2391 1834 -1698 -1384 -817 919 -1284 1501 1242\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -845 -7937 -1188 -894 -1115 -4617 -60 * * \n";
print INPUT_HMMS " 125 1077 -1188 1409 -328 -1554 -1494 -502 -961 -296 -1342 -599 -510 -1714 -197 -717 -549 1229 1139 -1804 -1294 1243\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -338 -7108 -2310 -894 -1115 -3990 -94 * * \n";
print INPUT_HMMS " 126 2211 -799 -2287 -1977 -1912 -1332 -1619 -1186 -1798 -1749 -1055 -1460 -1917 -1581 -1920 1354 -609 1596 -2309 -1967 1244\n";
print INPUT_HMMS " - -149 -500 233 44 -381 398 105 -623 210 -466 -721 275 393 45 98 359 117 -368 -295 -250 \n";
print INPUT_HMMS " - -2241 -350 -8119 -61 -4590 -491 -1794 * * \n";
print INPUT_HMMS " 127 -1853 -3150 -1774 1648 -3402 -959 1293 1123 -25 -707 -2257 57 -2947 -9 -1628 -287 1367 624 -3376 -2737 1246\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9544 -10586 -894 -1115 -922 -1082 * * \n";
print INPUT_HMMS " 128 -1019 -3468 -1870 1789 -3781 -2992 717 -812 1057 -3480 1568 -1630 891 -1194 -313 1547 -26 -3085 -3656 -2978 1247\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9763 -10805 -894 -1115 -2400 -303 * * \n";
print INPUT_HMMS " 129 -2012 -3485 1726 471 -3806 596 498 -3557 1573 -1403 -2574 91 126 97 -175 424 -515 -1396 -3668 -2986 1248\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9763 -10805 -894 -1115 -1439 -664 * * \n";
print INPUT_HMMS " 130 143 2787 226 -407 -3381 -3126 -1803 -187 817 -720 -2318 -1832 552 -1404 843 -122 -534 1208 -3460 -2868 1249\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9813 -10855 -894 -1115 -2115 -379 * * \n";
print INPUT_HMMS " 131 -800 -3479 825 -329 -455 -3038 1484 -3516 806 -380 915 -163 -835 -1246 -303 1112 579 124 -3675 460 1250\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -51 -9813 -4891 -894 -1115 -2115 -379 * * \n";
print INPUT_HMMS " 132 -2039 -3225 -2014 251 -3439 -3062 -1735 701 358 -844 1993 -218 497 803 -225 466 589 1131 -3476 -2864 1251\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9764 -10806 -894 -1115 -2393 -305 * * \n";
print INPUT_HMMS " 133 -169 -3486 630 1516 463 -2987 -1646 -3557 1902 -1302 -2575 -280 219 1508 -1734 -448 -614 -3108 -3669 -2987 1252\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9764 -10806 -894 -1115 -2393 -305 * * \n";
print INPUT_HMMS " 134 315 -3479 -335 2507 -796 -2989 -1648 -861 1367 -3494 -2569 -15 -474 138 -1736 -1896 270 -987 -3665 -2984 1253\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9764 -10806 -894 -1115 -2393 -305 * * \n";
print INPUT_HMMS " 135 345 -2865 -15 2040 676 -1168 -1902 720 -314 255 -2017 -2000 -3284 -1583 -2086 -103 324 -683 -3195 -2677 1254\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -26 -9764 -5883 -894 -1115 -2393 -305 * * \n";
print INPUT_HMMS " 136 -1997 -3442 1006 398 -1335 46 -1635 19 818 -3453 -2534 -773 2503 -1179 -1726 -411 721 -1274 -3633 -2957 1255\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -48 -9740 -4991 -894 -1115 -2509 -279 * * \n";
print INPUT_HMMS " 137 -119 -2198 -3463 -714 -2179 -3537 -2341 -91 7 1738 1191 -2803 1193 -424 -2802 -972 300 782 -2631 -2252 1256\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -278 -9695 -2521 -894 -1115 -2702 -241 * * \n";
print INPUT_HMMS " 138 149 1871 -1627 1486 -3431 -664 804 -3159 617 -1128 1228 -1383 -2827 509 687 296 -1688 -818 -3345 1105 1257\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9420 -10462 -894 -1115 -3453 -138 * * \n";
print INPUT_HMMS " 139 222 -1981 -3201 2257 1283 -3301 -2103 132 -258 -639 -1174 -2554 -347 -2204 -2556 -547 -252 554 1682 -2031 1258\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9420 -10462 -894 -1115 -3453 -138 * * \n";
print INPUT_HMMS " 140 -1746 -3176 -1610 596 -3480 -127 -1387 1275 1593 -1193 -2270 87 -2819 404 -46 939 -98 47 -3370 -2698 1259\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9420 -10462 -894 -1115 -3453 -138 * * \n";
print INPUT_HMMS " 141 445 -3203 -1631 1780 -3508 -2748 839 -899 679 -1858 -2296 849 -2841 -954 68 567 -269 957 -3396 -2723 1260\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -66 -9450 -4528 -894 -1115 -896 -1112 * * \n";
print INPUT_HMMS " 142 -195 3704 -2100 610 -3128 -3071 650 -919 821 -1258 202 -144 -3158 -1387 -1906 486 804 -2505 -3272 1017 1261\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9693 -10735 -894 -1115 -2805 -223 * * \n";
print INPUT_HMMS " 143 372 -3424 1770 973 -3742 -2932 -1590 -3491 894 -1816 1000 146 -3025 2198 -1679 -1838 -460 -56 -3608 -2927 1262\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9693 -10735 -894 -1115 -2805 -223 * * \n";
print INPUT_HMMS " 144 1825 -3363 951 1016 -3654 -2947 -1609 489 -263 -557 138 -1594 -509 -20 -183 -20 -1901 -911 -3564 -2900 1263\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -35 -9693 -5440 -894 -1115 -2805 -223 * * \n";
print INPUT_HMMS " 145 -561 -3335 718 650 2084 -2922 -1583 -759 -1176 -3338 -2432 1251 1227 -1134 -263 551 314 -1107 -3537 -2873 1264\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9660 -10702 -894 -1115 -2919 -205 * * \n";
print INPUT_HMMS " 146 492 2077 -680 -1771 -2784 -111 -1863 -502 -288 -2610 288 -1987 261 75 -2067 1733 200 559 -3046 41 1265\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -108 -9660 -3818 -894 -1115 -2919 -205 * * \n";
print INPUT_HMMS " 147 117 -3319 1171 383 -3640 -2821 -1479 -3391 842 784 -2409 1066 -628 1032 -111 68 -304 -1049 -3503 -2820 1266\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9555 -10597 -894 -1115 -3220 -164 * * \n";
print INPUT_HMMS " 148 622 -3319 819 1654 -3640 -967 794 -3390 -42 -3335 -2408 -1457 -622 -1020 -111 915 109 823 -3503 -2820 1267\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9555 -10597 -894 -1115 -3220 -164 * * \n";
print INPUT_HMMS " 149 -614 -3215 514 1675 -3489 -2849 -1512 36 480 1247 -2316 -1503 -630 153 601 -1760 -1796 -788 1315 -2772 1268\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -165 -9555 -3230 -894 -1115 -3220 -164 * * \n";
print INPUT_HMMS " 150 1045 988 1496 440 -546 -2794 -1471 -1190 -1126 757 -1981 -203 -2883 965 -199 -1716 -540 -2404 -3124 1092 1269\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -534 -9393 -1699 -894 -1115 -2627 -255 * * \n";
print INPUT_HMMS " 151 984 1761 204 1114 -3185 -397 1778 -2934 961 -788 -1956 -1010 -2467 -574 322 652 -1338 -2487 -3051 -2370 1270\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -388 -8952 -2098 -894 -1115 -4109 -86 * * \n";
print INPUT_HMMS " 152 1636 1724 505 1318 -2575 -258 -857 -2257 -491 -510 -1476 -869 -2274 831 -976 -1102 -1102 64 -2608 -1994 1271\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -321 -8570 -2346 -894 -1115 -4379 -71 * * \n";
print INPUT_HMMS " 153 -1008 -1562 -1465 1256 1690 189 -919 -1208 -774 -1460 1449 -1089 -2274 -683 1493 -1157 481 256 -1930 -1459 1272\n";
print INPUT_HMMS " - -150 -501 232 45 -382 398 105 -624 211 -465 -721 274 396 44 97 361 116 -370 -295 -250 \n";
print INPUT_HMMS " - -3420 -144 -9298 -24 -5901 -4530 -64 * * \n";
print INPUT_HMMS " 154 -968 -2407 -818 606 -2718 -62 -601 -2458 2151 -2418 -1501 -582 509 1300 -679 -853 598 222 -2597 -1924 1274\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -117 -8256 -3739 -894 -1115 -4530 -64 * * \n";
print INPUT_HMMS " 155 1110 -2209 -809 1379 -2458 -1910 -584 -2162 -198 -2195 1348 1053 -2006 1207 -690 -833 -857 -1793 -2435 2005 1275\n";
print INPUT_HMMS " - -148 -501 232 44 -378 398 105 -625 213 -467 -721 277 393 44 95 360 116 -370 -295 -246 \n";
print INPUT_HMMS " - -3311 -156 -9189 -26 -5783 -4573 -62 * * \n";
print INPUT_HMMS " 156 -935 -2387 -763 1353 -2710 -1897 -556 -2453 -121 -2401 -1483 -536 1534 1302 1571 438 519 -2012 -2570 -1897 1277\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -8 -8146 -9189 -894 -1115 -166 -3204 * * \n";
print INPUT_HMMS " 157 -185 -3576 704 705 -3897 -307 -1735 -3648 1153 -3592 -2665 885 1787 921 -352 587 -559 -3198 -3759 -3076 1278\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9873 -10915 -894 -1115 -1841 -472 * * \n";
print INPUT_HMMS " 158 -2328 -2192 -4440 -30 -180 -3849 571 1642 -3464 -2042 143 -3416 -592 -3131 -49 -985 142 2091 3422 -2298 1279\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9873 -10915 -894 -1115 -1841 -472 * * \n";
print INPUT_HMMS " 159 -2126 -3329 883 1900 -614 -3146 -1818 323 772 485 25 -859 -696 41 -1935 -739 -547 -323 -3576 28 1280\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9873 -10915 -894 -1115 -1841 -472 * * \n";
print INPUT_HMMS " 160 -4438 -6572 3803 345 -6653 -4125 -3597 -6671 -1053 -6485 -5959 1438 -4729 -3295 -5119 -4022 -4547 -6096 -6692 -5514 1281\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9873 -10915 -894 -1115 -1841 -472 * * \n";
print INPUT_HMMS " 161 -2742 -2531 -5106 -4489 -2456 -4354 -3252 2960 -4096 1204 -1630 -3999 205 -3722 -723 -3453 -2685 1196 -3079 153 1282\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9873 -10915 -894 -1115 -1841 -472 * * \n";
print INPUT_HMMS " 162 -4026 -5883 3782 168 -6049 -4008 -3318 -896 -3509 -1599 -5138 -304 -4520 725 -4324 -3701 -4080 -5440 -6035 -5053 1283\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -92 -9873 -4044 -894 -1115 -1841 -472 * * \n";
print INPUT_HMMS " 163 1812 -3442 1134 1394 -3736 -3020 -1681 -3468 -1273 -1282 660 142 -3112 -26 -1776 686 -1975 -1209 -3642 821 1284\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9784 -10826 -894 -1115 -1387 -695 * * \n";
print INPUT_HMMS " 164 -243 1288 1754 2035 -3768 -1395 566 -857 -250 -1732 -2575 -1712 -3157 -1277 -141 65 -2018 358 -3679 -433 1285\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9838 -10880 -894 -1115 -2100 -383 * * \n";
print INPUT_HMMS " 165 -2312 -3800 3256 1307 -4110 -3198 432 -3867 -1539 -1460 -2897 -193 -3335 -1470 -255 -245 -2257 -3417 -3982 193 1286\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -42 -9838 -5194 -894 -1115 -2100 -383 * * \n";
print INPUT_HMMS " 166 590 776 -1460 -2619 -2397 -78 -2304 -1957 1199 -471 613 -2654 -3596 -2283 -1378 1325 411 934 2131 -715 1287\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9799 -10841 -894 -1115 -350 -2216 * * \n";
print INPUT_HMMS " 167 335 -3634 1731 1084 -1052 180 444 -3705 56 -3650 -2723 1629 -3228 10 -1882 233 -517 -904 -3817 -210 1288\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -38 -9946 -5316 -894 -1115 -1060 -942 * * \n";
print INPUT_HMMS " 168 -4464 -6569 3166 -1202 -6672 -4160 -3635 -6694 -4101 -6513 -202 3298 -4765 -3334 -5155 -4054 -4576 -6118 -6716 -5544 1289\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9910 -10952 -894 -1115 -1503 -628 * * \n";
print INPUT_HMMS " 169 -2306 -3533 184 502 -3763 -3267 539 -893 -1638 -3515 -2661 -1948 3382 -1569 -2134 100 -588 -171 -3785 -3158 1290\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9910 -10952 -894 -1115 -1503 -628 * * \n";
print INPUT_HMMS " 170 -861 -2297 -713 -3420 1217 -3801 -2632 -1810 -3146 1577 1098 307 -3859 1791 -3177 690 -2281 596 -2741 -194 1291\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9910 -10952 -894 -1115 -1503 -628 * * \n";
print INPUT_HMMS " 171 1393 -2237 -4383 -1035 -400 -3867 274 -1737 -3430 1235 3544 -1359 -3920 -3112 -3342 159 -2297 -295 -2689 -2339 1292\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9910 -10952 -894 -1115 -360 -2181 * * \n";
print INPUT_HMMS " 172 1619 3932 -5208 -4723 -3037 -3978 -3564 -493 -4351 -2906 -2264 1104 -4322 -3979 -4175 -807 -816 1933 -3540 -3208 1293\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -24 -9968 -6024 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 173 285 -2439 -3753 -18 -2438 -3775 -2618 -1044 -2950 -1222 -1650 -3078 673 -2743 -3084 2087 412 1952 -2894 -2517 1294\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9946 -10988 -894 -1115 -1060 -942 * * \n";
print INPUT_HMMS " 174 -777 -4857 1774 3309 -5129 -3825 -2900 -953 -2803 -4880 52 -2465 -524 -2520 -3427 -3193 -3384 -4452 -5128 -4355 1295\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9946 -10988 -894 -1115 -514 -1738 * * \n";
print INPUT_HMMS " 175 -6101 -5259 -6918 -1220 159 -6744 -3166 -4618 -6669 -1448 1202 -5492 -6575 -5524 -6113 -5977 -5971 -4955 -2417 4682 1296\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 176 2241 -2979 -765 -4802 -3404 -4193 -3904 -81 -4538 -3138 -2568 -4203 -4561 -4207 -4450 -238 -724 2680 -3967 -3624 1297\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 177 -871 -3652 646 871 -610 -3153 152 -3723 2242 -3668 738 1150 187 978 -1900 -71 -2118 -1063 -3835 -3153 1298\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 178 -4452 -6450 3591 1898 -6691 -963 -3685 -6695 -4137 -6526 -5973 -2802 -4802 -3382 -5175 -1126 -909 -6101 -6732 -5582 1299\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 179 -4724 -4173 -7340 -6943 -3602 -7202 -6682 3791 -6869 -576 1777 -6880 -6633 -6232 -6741 -6599 -4674 -435 -5449 -5412 1300\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 180 -6579 969 -6989 -7335 3575 -6863 138 -5469 -6890 -1267 -4877 -5482 -6719 -5619 -6257 -6109 -6431 -5623 -2308 3659 1301\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 181 388 1786 951 1168 -1089 -3155 550 -1088 533 -1467 -2734 1110 -3248 250 -1903 954 -243 -3264 -3830 -227 1302\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 182 -6639 -5546 -6999 -7361 2566 -6884 1588 -5523 -6916 -4824 -4923 -5490 -6738 -5632 -6276 -6134 -6487 -5680 -2307 4398 1303\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 183 -5623 -4979 -7950 -7365 -2904 -7769 -6139 -569 -7160 2471 3067 -7449 -6705 -5821 -6580 -7159 -5443 -3356 -4678 2820 1304\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 184 -3032 -4322 -3006 -495 -4776 -3913 1249 -4417 1928 -4274 -3422 -405 -3964 -29 3095 -2911 -2916 -318 -4331 796 1305\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 185 -889 -3654 -678 1770 -3975 -3154 2165 -3726 1408 -3670 -2743 602 -3247 1922 93 112 -70 -3276 -3837 -3154 1306\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 186 -2417 -2302 -4417 -3798 -544 -3921 1164 -1803 -920 2019 1627 -940 -3974 -3142 1929 -2991 -915 857 -2752 -2402 1307\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 187 -4558 -6474 -366 3828 -6739 -4283 -3789 -6718 -4254 -6604 -6085 -2902 -4890 -3494 -5281 -4177 -4686 -1251 -6760 -5666 1308\n";
print INPUT_HMMS " - -149 -500 233 43 -381 400 105 -626 212 -466 -721 275 394 45 96 359 117 -369 -295 -250 \n";
print INPUT_HMMS " - -72 -4858 -6116 -985 -1015 -701 -1378 * * \n";
print INPUT_HMMS " 188 -1222 245 -516 1490 -3931 -1482 -1800 904 919 -375 -2709 82 -567 1 592 -842 -1185 1045 -3806 -3128 1311\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -1040 -961 * * \n";
print INPUT_HMMS " 189 -622 -3606 -2031 1680 -35 -3148 584 -189 2006 -390 -2699 -1790 -3241 1643 604 -790 -2108 -3221 -3798 -3125 1312\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -523 -1717 * * \n";
print INPUT_HMMS " 190 -2411 784 -4508 -3888 2334 -1245 529 -1775 -3536 -927 543 -3492 -3982 2080 -3424 921 941 -1693 1032 1686 1313\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 191 718 2235 -3703 -3120 -2408 -1229 -2576 -677 -79 1170 1448 -3040 9 -303 1111 360 -2309 25 -2861 -2482 1314\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 192 -4347 -3844 -7001 -6645 -4030 -6779 -6530 1051 -6569 541 -2764 -6459 3000 -6301 -6611 -6135 -4328 2344 -5740 -5426 1315\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 193 -2180 448 348 -565 -3974 -3153 -1812 -3724 658 -1415 -2742 1855 1348 637 1872 261 16 -3275 -3836 -3153 1316\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -466 -9968 -1862 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 194 -1834 -3268 -126 446 -3572 -2807 1687 -3311 555 -1481 -2362 -1448 3160 -193 -1560 -1721 -1773 -998 -3460 442 1317\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9504 -10547 -894 -1115 -92 -4016 * * \n";
print INPUT_HMMS " 195 -945 1126 1639 -482 -3971 -3154 1611 -3721 1164 -3666 1125 2156 -3247 -1353 579 -784 -607 -3272 -3834 674 1318\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 196 -6554 -5547 -954 -6861 1358 -6776 766 -5523 -6783 -4833 -4924 -701 -6678 -5553 -6237 -6064 -6417 -5671 -2325 4619 1319\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 197 -5675 -5010 -8052 -7453 -2964 -7928 -6483 774 -7275 1853 4529 -7676 -6765 -5886 -6677 -7367 -5492 -3290 -4844 -5125 1320\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 198 -124 -3619 1845 1158 -3925 -1149 2292 -3666 -1408 -1095 982 353 -3255 -32 -1913 26 -2122 374 -3812 609 1321\n";
print INPUT_HMMS " - -149 -500 236 44 -381 398 105 -627 212 -466 -721 275 393 45 95 359 117 -370 -295 -250 \n";
print INPUT_HMMS " - -191 -3021 -11010 -53 -4793 -701 -1378 * * \n";
print INPUT_HMMS " 199 -699 -3642 -609 -1483 -3958 1776 -1815 -947 1470 -3656 7 705 -3249 1305 182 -195 72 -99 -3828 -3148 1323\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -408 -9968 -2028 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 200 -3813 -4613 -3103 -3203 -5058 -4193 2339 -5658 -2493 -5421 -4801 -3302 -4662 4280 -2576 -3782 -461 -5107 -4957 -4344 1324\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9563 -10605 -894 -1115 -102 -3878 * * \n";
print INPUT_HMMS " 201 -2208 -3370 -2196 -1646 -899 -391 1002 -354 1300 -3336 951 -1931 1842 1290 392 375 531 -1008 -3626 -635 1325\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 202 -3493 -5171 2254 2893 -5424 -3861 -2935 -5249 -722 -5159 -4333 1297 -698 -2543 -3492 -3259 -1412 -4766 -5337 131 1326\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3505 -9968 -135 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 203 -2421 -2043 -2715 -2793 870 -2772 -422 -1944 -2485 -1614 -1542 -2131 -2981 -2125 -2335 -2438 -2456 -1991 187 4469 1327\n";
print INPUT_HMMS " - -149 -500 233 43 -381 398 110 -626 210 -466 -721 275 394 45 96 359 117 -369 -295 -245 \n";
print INPUT_HMMS " - -1651 -565 -7529 -102 -3870 -31 -5573 * * \n";
print INPUT_HMMS " 204 -3729 -3419 -6139 -5555 -2943 -5497 -4431 2861 -5221 1738 559 -5151 -1056 -4726 -5008 -4639 -3664 1167 -4013 164 1329\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 205 -877 -3653 745 -1484 -3973 -3158 369 -3722 232 -3669 -2743 2714 -3252 -1358 269 71 1966 -833 -3838 -3156 1330\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 206 -2182 -3652 -760 1692 -3972 958 -1815 -3722 81 -3668 -2742 -1791 1045 598 -1904 621 175 -957 3306 -3154 1331\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 207 -2189 -3662 884 278 -3983 -3160 605 -3734 2203 -3678 -2752 1649 -768 -1360 1508 322 -2128 -977 -3845 -3162 1332\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -83 -9968 -4182 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 208 -4387 -4433 -6814 -6777 670 -5452 -4571 -3161 -6400 -2377 5116 -5664 -5788 -5583 -5996 -4828 252 -3693 -3838 -2970 1333\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9887 -10929 -894 -1115 -302 -2405 * * \n";
print INPUT_HMMS " 209 -7897 -6692 -7584 -7675 -8060 -6650 -6834 -8988 -6576 -8353 -8200 -7615 -7061 -7168 4270 -8272 -7969 -8674 -6813 -7875 1334\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 210 2584 -3651 134 -428 -3966 17 549 -3712 -1414 -1640 -2744 -1805 -3262 -1372 672 619 -605 -3270 -3840 -3161 1335\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 211 -3580 -3246 -6067 -5544 -3414 -5478 -4600 3666 -5255 -621 529 -5136 -5418 -4936 -5139 -993 14 -173 -4338 -3983 1336\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 212 -5670 -5010 -8048 -7452 -2965 -7903 -6478 -2438 -7271 3268 553 -7664 -6761 -5886 -6674 -7342 -5489 -664 -4843 -5120 1337\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 213 -4048 -3595 -6677 -6297 -813 -6342 -5968 2683 -6168 -3154 -2997 -671 -6185 -6033 -6227 -5633 -878 2999 -5570 -5090 1338\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 214 -4543 -6673 3932 86 -6761 -4225 -3704 -6787 -4186 -6601 -6081 1057 -4832 -3404 -5262 -4127 -4656 -6209 -6803 -5623 1339\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 215 -8386 -6773 -7706 -8090 -7143 -6750 -7075 -9165 -8250 -8440 -8473 -8060 -7177 -8109 -7669 -8910 -8511 -8949 6314 -6875 1340\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 216 -5685 -5017 -8060 -7459 -2963 -7941 -6490 1363 -7283 2946 2257 -7689 -6769 -5887 -6681 -7382 -5499 -3302 -4845 -5130 1341\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 217 -4299 -3775 -7002 -6698 -4437 -6886 -7019 2076 -6691 -1247 -3111 -6541 -6589 -6655 -6884 -6287 -4291 3424 -6287 -5769 1342\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 218 -4302 -6276 327 2935 -6426 -829 -3528 -6369 -66 -6213 -5576 -2740 -4708 3016 -4656 -3938 -4375 -5831 -6403 -5352 1343\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 219 -4302 -3778 -7004 -6699 -4428 -6886 -7014 1516 -6691 -1312 -3103 -6542 -6589 -6650 -6882 -6287 -4293 3579 -6276 -5763 1344\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 220 -1014 -4800 -3568 -3779 -5496 -4496 4849 -6277 -3459 -6099 -5463 -3839 -5073 2779 -3567 -4083 -4305 -5541 -5549 -4886 1345\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 221 -2291 -2798 -231 1879 -442 -1145 -2224 403 -2108 -362 825 275 -3571 -2009 -641 999 -423 632 -3173 422 1346\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 222 -2382 905 -2249 -394 -4165 -3337 553 -3894 2712 -3821 -2910 1463 -3422 -1492 1928 -252 -556 -3456 -3965 -3322 1347\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 223 -6586 -5524 -7007 -7354 4459 -6882 -3087 -636 -6914 -4630 -4746 -5507 -6731 -5636 -6277 -6136 -6440 -5537 -2332 566 1348\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 224 -2199 609 24 2162 -3994 -372 1758 -3744 142 -3688 -2762 -78 -3263 2129 1478 -2078 -2138 -3295 -3854 -3172 1349\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 225 -5616 1762 -8007 -7431 -2972 -7697 -6416 -2482 -7229 3192 1314 -7556 -6712 -5872 -6638 -7135 -5461 -3364 -4831 -5083 1350\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 226 -2428 -2257 -4748 -4114 -2208 -3973 -2843 -654 -3714 2086 2313 1746 -4023 -3342 -3523 -1155 1135 -392 -2715 5 1351\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 227 -2834 -4330 -2078 -143 -4635 -3566 2956 -4394 -2037 -1551 -3453 123 2989 2163 -2549 -814 -2791 -3950 -4507 -3797 1352\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 228 -5053 -6674 -333 3883 -7083 -4676 -4221 -7238 -4712 -7008 -6533 -3362 -5269 -3952 -5692 -4667 -5170 -6674 -6830 -6075 1353\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 229 -3135 -3736 -6088 -6439 -6371 -4002 -5669 -6260 -6282 -6505 -5558 -4786 -4810 -5765 -5948 -759 4017 -4953 -6535 -6518 1354\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 230 -5731 -5055 -8078 -7479 -374 -7958 -6395 -2483 -7297 3211 1743 -7687 -6774 -5879 -6679 -7401 -5539 -3399 -4786 -4981 1355\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 231 -6624 -5542 -6990 -7350 2467 -6876 1313 -5520 -6908 -4823 -4920 -5486 -6733 -5629 -6271 -1908 -6476 -5675 -2307 4418 1356\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 232 -5475 -4954 -7541 -7134 -2983 -7303 -6128 -2536 -6840 3001 3008 -526 -6595 -5765 -6381 -6739 -5364 -3403 -4765 -4864 1357\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 233 2373 2334 -6388 -6726 -6301 -1550 -5653 -6121 -6335 -6385 -5411 -4718 -4688 -5759 -5928 10 2847 -4798 -6526 -6515 1358\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 234 -4281 -3762 -6984 -6690 -4516 -6843 -7039 2907 -6686 -3248 -3186 -6520 -6581 -6688 -6894 -6251 -4277 3054 -6360 -5797 1359\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 235 991 -3754 -3034 -2690 334 -1181 -3000 -4586 1645 -4627 -3745 3376 -4021 -2608 -3085 -409 -2899 -3999 -4826 -4251 1360\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 236 -4663 -4171 -7174 -6678 -3279 -6839 -5917 3049 -6485 1711 282 -6513 -6344 -5754 -6239 -6123 -4589 1117 -4922 36 1361\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 237 -4301 -3826 -6893 -6470 -3735 -6584 -5992 2510 -6322 1037 3095 -6244 -6277 -5929 -6260 -5875 23 1658 -5282 -5044 1362\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 238 -7685 -6760 4229 -6476 -8101 -6473 -6787 -9101 -7552 -8490 -8398 -6748 -6945 -7125 -7457 -7808 -7836 -8719 -6906 -7923 1363\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 239 -4288 745 -5918 -4378 -4222 -5135 1718 -4006 -1954 -688 488 -4094 -5102 -2914 3868 -4470 -4081 -4044 -4331 -3983 1364\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 240 -6480 -5466 -7023 -7326 4093 -6891 -3133 -886 -6894 -4220 79 -5538 -6712 -5626 -6267 -6141 -6331 -5294 -2375 2838 1365\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 241 -5709 -5038 -8078 -7473 -2956 -7960 -6491 -558 -7294 3280 524 -7711 -6774 -5885 -6683 -7404 -5520 -3349 -4838 -5125 1366\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 242 710 2242 -3877 -3303 -2516 -1250 -2713 -2067 -3069 -2399 1677 -3169 -3905 2444 -3186 2113 -2386 -608 -2971 2 1367\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 243 -241 -3634 -144 -64 -3946 -3158 242 -892 2184 204 -2725 -882 -3251 679 -431 -1179 -2120 1582 -3822 -3145 1368\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -721 275 394 45 96 359 119 -369 -294 -249 \n";
print INPUT_HMMS " - -32 -5550 -11010 -978 -1023 -701 -1378 * * \n";
print INPUT_HMMS " 244 -304 -3653 -2028 534 -3975 -3154 1864 -3725 1685 -3669 -2743 1469 -3248 2022 284 -885 538 -356 -3836 -3154 1371\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 245 -329 -190 -3332 -2760 -2542 -3671 -2447 -560 572 -856 403 318 1906 1219 -2823 -570 58 1794 -2959 -2555 1372\n";
print INPUT_HMMS " - -149 -500 233 43 -381 398 109 -626 210 -466 -721 278 394 45 96 359 117 -369 -295 -249 \n";
print INPUT_HMMS " - -84 -4162 -11010 -110 -3770 -701 -1378 * * \n";
print INPUT_HMMS " 246 -3889 2944 -6607 -6267 -4251 -5841 -5826 1332 -6105 -3252 -3066 -5790 -5936 -5924 -6111 -1534 -163 3250 -5537 -5090 1374\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 247 -498 -541 -413 -1484 -3956 -3156 401 -3703 1212 -3654 1398 -152 2063 597 -1904 1408 443 -1365 -3827 -3148 1375\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 248 -947 -4004 -4998 -3847 -4117 -4777 -2971 -3569 2314 1085 376 -3706 -4749 -2693 2806 -3988 -3599 -1005 -4150 -3911 1376\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 249 -303 -3677 521 489 -3998 -3169 -1832 -3749 1863 -3692 -2766 2282 -3265 795 977 528 -2142 -3299 -3859 -3176 1377\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 250 -976 -3658 -684 1157 -3979 -3160 452 -3729 3047 -1448 -646 -1796 -3253 -36 537 -2067 -521 -3280 -3840 -3159 1378\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 251 -5643 -4990 -8015 -7410 1520 -7865 -6421 -461 -7225 3013 823 -7605 -6737 -5858 -6636 -7282 -5461 -812 -4821 -5092 1379\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 252 -5701 -6012 -5073 -4798 -7000 -5671 -4343 -6867 -472 -6451 -5896 -4813 -5919 4537 -3132 -5613 -5551 -6567 -5932 -6008 1380\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -47 -9968 -5007 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 253 -6169 -5697 -6957 -6748 -4382 -6516 -5904 -4040 -769 3340 -3312 -6646 -6623 -5808 -5311 -6821 -6144 -4812 -5585 -5688 1381\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 254 -1716 1095 -6459 -6028 -3940 -6048 -5461 1143 -5841 1305 -2799 -5704 -5919 -5642 -5835 -5289 -824 3032 -5131 -4703 1382\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 255 -52 905 -6348 -6700 -6341 3667 -5673 -6179 -6354 -6438 -5470 -4751 -4720 -5786 -5948 -3282 -3505 -4850 -6519 -6546 1383\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 256 670 948 -4999 -4383 -2449 -4223 -3141 1345 -3995 579 -1660 -3878 -4268 -3630 -3809 503 48 2429 -3000 -2652 1384\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 257 398 -3530 -6269 -6559 -6138 -1036 -5540 -5917 -6198 -6201 -5255 -4650 -4637 -5644 -5824 1839 3162 305 -6382 -6339 1385\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 258 3256 2364 -6346 -6691 -6266 -3827 -5615 -6085 -6299 -6352 -5376 -4676 -4645 -5721 -5888 925 -704 -4758 -6491 -6482 1386\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 259 -5254 -4703 -7615 -7003 -461 -7276 -5909 223 -6758 2682 3305 -6979 -6449 -5604 -6266 -6571 -5100 -1069 -4611 -92 1387\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 260 -5693 -5015 -7996 -7426 3362 -7871 -6113 -2464 -7236 2405 1357 -7535 -6725 -5827 -6620 -7302 -5502 -3375 -4620 -4601 1388\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 261 -4707 -4154 -7316 -6911 -3524 -7176 -6617 3576 -6834 930 421 -6854 -6590 -6165 -6687 -6571 -4653 491 -5369 -5350 1389\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 262 3637 -3624 -6153 -6508 -6314 -3898 -5626 -6170 -6284 -6424 -5461 -4710 -4711 -5726 -5913 -1033 -3500 -4845 -6502 -6494 1390\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 263 1775 3935 -6337 -6686 -6276 -3832 -5620 -6101 -6302 -6367 -5390 -4680 -4650 -5726 -5892 2664 -3421 -4768 -6498 -6489 1391\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 98 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -53 -4813 -10965 -167 -3197 -1363 -710 * * \n";
print INPUT_HMMS " 264 -7582 -6594 -7264 -7208 -7946 -6530 -6425 -8664 4064 -8079 -7834 -7153 -6917 -6542 -5685 -7844 -7590 -8358 -6696 -7636 1393\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 265 -6603 -5514 -6963 -7325 2963 -6834 -3041 -5494 -6887 -4794 -4893 -5465 -6698 -5607 -6246 -6106 -6455 -5652 -2287 4372 1394\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 266 -4890 -6630 455 3830 -6967 -4528 -4056 -7090 -4545 -6872 -6385 -3186 -5125 -3779 -5550 -4496 -5006 -6523 -6780 -5927 1395\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 267 -5015 -6628 -423 3886 -7042 -4638 -4185 -7199 -4675 -6969 -6494 -3326 -5231 -3916 -5653 -4631 -5133 -6635 -6785 -6037 1396\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 268 -2526 -2352 -4823 -4183 -2331 -4082 159 2471 -3689 -2177 2681 -3702 -4128 -3411 1313 -1064 -2468 1974 -2852 -2507 1397\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 269 -959 1399 -2698 -2140 -50 -949 1518 -2450 -549 -2701 1286 1228 -3511 -161 -2394 725 -2185 -2277 2549 3005 1398\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 270 -199 3021 -4721 -4101 -2241 -3916 -2856 -1777 -3709 403 -1488 -3590 2689 -3341 -3527 714 -1025 859 -2743 -392 1399\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 271 -7768 -6613 -7570 -7954 -8124 -6589 -7245 -9201 -8154 -8558 -8496 -7885 4337 -8027 -7600 -8219 -8016 -8763 -6863 -8119 1400\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 272 -2145 1940 482 1019 -3898 -3123 -1783 -1292 780 -1405 -190 32 -3216 632 -566 1203 919 -31 -3779 -168 1401\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -402 -2040 * * \n";
print INPUT_HMMS " 273 -4343 -3816 -7037 -6723 -4310 -6920 -6972 2782 -6709 385 -2994 -6576 -6594 -6596 -6864 -6320 -4330 2834 -6158 -5721 1402\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 274 142 -3653 1965 1164 -3974 121 238 -3724 1031 -1548 -2742 894 -3246 686 -1900 -306 -602 -3275 -3836 -92 1403\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 275 -4532 -6672 3714 634 -6746 -4216 1283 -6770 -4168 -6585 -6061 1448 -4822 -3390 -5239 -4116 -4643 -6194 -6792 -5608 1404\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 276 -6527 -5494 -7056 -7363 3915 -6935 -3165 -4879 -6935 1540 -4215 -5577 -6735 -5647 -6298 -6192 -6372 -5293 -2402 1582 1405\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 277 1493 947 -4976 387 -2425 -4211 -3107 605 -3964 315 301 -3854 -4251 -3598 -3777 -3304 -1367 2507 -2967 -2621 1406\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 278 -2422 722 -1045 -4124 1567 -3969 466 -238 -3721 -6 -128 -3611 -4019 -3345 -3523 -1154 -2363 -710 -2702 3978 1407\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 279 -4221 -3732 -6864 -281 -4123 -6626 -6311 3206 -6401 -1121 2259 -6278 -6366 -6210 -6462 -5951 -4202 1914 -5706 -5312 1408\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 280 159 3175 -5742 -5495 -4001 -3906 -4338 -3493 -5111 -451 -3219 -4349 -4501 -4684 -4870 1307 2961 -790 -4465 -4174 1409\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 281 -4532 -6666 3788 1417 -6751 -964 -3693 -6772 -4170 -6587 -6063 -2796 -4823 -211 -5241 -4117 -4644 -6195 -6794 -5612 1410\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 282 -3887 -5591 1997 -2292 -5865 1765 1695 -5687 625 -5551 -4794 2864 -4487 -2816 -1534 -3611 -3895 -5207 -5693 -4866 1411\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 283 2622 632 -2539 -445 -3112 -1120 -2102 -685 -1871 -2932 347 -574 -3476 -1795 -445 -953 1637 -2511 -3352 -2842 1412\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 284 -349 1668 -6967 -7290 2201 -6810 -3062 -5413 -6847 -4773 -4835 -5465 -6682 -5599 -6226 -6053 -6332 -5549 1600 4333 1413\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 285 -2245 -3720 -492 -441 -4038 -3196 -1871 -741 105 -3734 -2811 1114 -3301 473 -1971 1826 2544 -3340 -3903 -3217 1414\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 286 -1238 -3669 -2065 134 -3990 -868 368 -3735 2087 -3682 -2760 -1822 -3276 -1379 2380 632 -1214 689 -3850 -3176 1415\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 287 17 -3653 1323 1417 -3975 -3154 395 -3725 928 -3670 -2743 817 -3247 748 637 1134 -199 -3276 -3837 -3154 1416\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 288 -4516 -6638 2287 2213 -6727 -1075 -3682 -6742 -4144 -6560 -6027 -2792 -4815 3265 -5199 -4104 -4625 -6168 -6766 -5594 1417\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 289 -4519 -3984 -7172 -6814 -3887 -7036 -6760 3304 -6764 388 1328 -6700 -6596 -6366 -6766 -6427 -4488 1860 -5716 -5523 1418\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 290 -2611 1849 -4939 -4302 -2342 -4174 -3044 713 403 1939 993 -3808 -4209 -3517 1945 -3264 -2551 572 -2903 -2570 1419\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 291 800 -3654 690 1746 -3975 -866 -1813 -3726 -331 -3670 -2743 229 -3248 1120 311 864 -2120 640 -3837 -3155 1420\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 292 1494 -3600 -6127 -6266 -4965 -248 -5299 -4468 -5903 -1479 4819 -4734 -4774 -5440 -5603 -3387 -3513 -4121 -5678 -5517 1421\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 293 -5570 -6508 -3357 3901 -7293 -5190 -4654 -7464 -840 -7148 -6681 -4067 -5718 -4404 -4900 -5274 -5645 -6982 -6627 -6404 1422\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 294 -798 -3194 -2497 -1932 -3330 -3406 -2077 772 2031 -1378 2799 -2174 -3488 1030 1869 -889 -796 -2714 -3494 -2965 1423\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 295 -854 -3300 -440 82 1278 -3261 -1940 -491 165 43 -143 -503 -3349 -459 -2072 555 1686 -2846 -3573 2068 1424\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 296 -4735 -4185 -7344 -6939 -3574 -7198 -6641 3324 -6859 -232 3442 -6875 -6623 -6203 -6716 -6589 -4682 205 -5411 -5384 1425\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 297 -765 -4926 -7919 -7332 -166 -7686 -6274 -589 -7132 3202 -1734 -7432 -6680 -5825 -6572 -7073 -5380 -3253 -4771 -4951 1426\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 298 -795 -3652 -529 -482 -3973 203 243 -3724 1282 -1415 1343 1849 -3246 1026 1017 704 -602 -3274 -3836 -3153 1427\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 299 593 -3612 -2048 444 -3915 -514 -1825 -3652 131 -1456 -2706 426 -3257 -53 -1917 261 2129 1300 -3807 -3135 1428\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 300 -5385 -4765 -7848 -7317 -3093 -7707 -6528 -499 -7170 3221 -1849 -7440 -6731 -5963 -6693 -7133 -5252 54 -4967 -5185 1429\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 301 -3754 -5507 635 1869 -5736 404 -3136 -5589 1051 -5483 -4699 2649 -4395 1951 -3843 -3484 -3772 -5093 -5664 -4775 1430\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 302 -6632 523 -7000 -7361 4170 -6882 -3061 -5516 -6916 -4819 -4917 -5489 -6736 -5631 -6275 -6131 -6480 -5673 3184 1799 1431\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 303 -1608 -4129 2705 1067 -4435 -1144 -2196 -4202 -810 -4139 -3233 2070 -3592 740 -2392 -1515 -2563 -3745 -4309 1665 1432\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 304 -5671 -5008 -8042 -7440 598 -7912 -6450 2738 -7260 2456 266 -7652 -6756 -5875 -6663 -7342 -5486 -3308 -4828 -5095 1433\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 305 -959 470 -6206 -6453 -6269 2471 -5559 -6087 -6146 -6342 -5372 2027 -4677 -5622 -5830 1756 1026 -4785 -6487 -6448 1434\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 306 -2420 1575 -4764 -4128 -321 -3968 -2838 1663 -3724 424 -1449 -3613 -4017 -3346 1725 -127 -2361 505 3453 1350 1435\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 307 -1258 -4695 -6561 -6924 -7076 -4906 -6303 -7198 -6970 -7280 -6506 -5717 4274 -6544 -6617 -4502 -4707 -6001 -6722 -7163 1436\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 308 -2455 -2339 -4605 -4000 -2329 741 -2887 559 -3645 1208 -1570 1520 -4036 -3309 -3523 185 2082 -32 -2828 -2481 1437\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 309 558 -3556 -3486 -3172 -4498 -3756 312 -728 -3059 -4341 -3549 -3195 3550 1324 -3385 323 -3003 -3719 -4677 -4211 1438\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 310 -4137 -3820 -6430 -5813 -2673 -5800 -4436 -2304 -852 1875 2850 -5409 -5564 -4778 -5070 -4945 -4044 -585 -3848 3538 1439\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 311 -2274 -3610 -2172 -1624 -3901 -3256 2812 -3613 -1482 -3613 -2725 2135 422 -607 1311 427 -505 1502 -3823 -3183 1440\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 312 -6659 -5575 -7018 -7379 4519 -6867 -3123 -5561 -6950 -4859 -4959 -5541 -6748 -5682 -6312 -6177 -6518 -5722 -2370 526 1441\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 313 -5711 -5039 -8079 -7473 -2955 -7961 -6491 -558 -7295 3254 1086 -7712 -6774 -5885 -6683 -7405 -5521 -3352 -4838 -5125 1442\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 314 -424 -4918 -5666 -4145 -441 -5065 -3104 -5029 459 -4882 -4243 -3932 -5070 -2718 3898 -4431 -4203 -1205 -4835 -4696 1443\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 315 -4832 1983 -6163 -4275 -5711 -5318 -3085 -5367 -325 -1322 -4435 -4029 -5219 -2695 3956 -4750 -4461 -5208 -4835 -1046 1444\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 316 1288 -3632 -6060 -5594 2787 -5433 -3468 2314 -5208 -339 -2298 -4881 -5363 -4611 -4927 -4562 -3867 -2723 -2908 2101 1445\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 317 1031 -2470 -4874 -4299 -2548 -1034 -3121 656 -3924 54 -1787 -3752 -4145 -3565 -3763 2678 327 -625 -3050 -2709 1446\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 318 -4870 -5423 -5993 -4182 -6408 -5309 -3062 -683 3591 -5199 -4558 -3973 -5200 -211 1610 -1232 -4474 -5416 -4996 -4975 1447\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 319 2786 3328 -5805 -5457 -3718 -4242 -4327 684 -5093 -3400 -2860 -4520 -4707 -4703 -4882 -1576 -739 926 -4320 -3994 1448\n";
print INPUT_HMMS " - -147 -500 235 45 -381 398 105 -627 210 -466 -721 275 393 48 95 359 117 -370 -295 -250 \n";
print INPUT_HMMS " - -3177 -4858 -226 -1885 -455 -701 -1378 * * \n";
print INPUT_HMMS " 320 1054 -1106 -3265 -2718 2155 -2778 -1584 46 -2398 1935 413 -2359 -2767 -1974 -2279 -1907 -1227 -174 -1274 -820 1453\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -15 -7187 -8230 -894 -1115 -33 -5487 * * \n";
print INPUT_HMMS " 321 1036 1842 1956 -439 -3873 959 -1835 -217 -254 -3586 -2681 -84 -3265 -1386 -1930 576 -604 -321 -3786 -3122 1454\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 322 -2179 -3653 1678 1378 -590 -323 2024 -134 367 -3669 -2742 748 -795 1152 -343 78 -2118 -3275 -3836 -3153 1455\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 323 1453 720 -4578 -3968 -2302 -3929 -2855 -1844 -3612 -2197 -1547 175 -4013 -3277 -3492 1260 -828 1261 1416 2881 1456\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 324 -3004 703 3513 254 -4870 -1222 -2545 -4656 -2299 -4586 -3709 -520 -3895 -27 -2876 236 -63 -4188 -4761 -4004 1457\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 325 1315 -2468 -3557 -1005 -344 -3733 1323 1117 522 -980 2862 -2946 172 -416 -2956 -323 -2299 229 -2896 -2508 1458\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 326 -2346 -3835 709 2316 -4151 -1491 -1962 -3907 1853 -3849 -2929 -277 -3383 2073 -2086 -1003 -2290 -479 -4017 -3323 1459\n";
print INPUT_HMMS " - -148 -494 235 43 -376 397 104 -622 210 -468 -722 275 395 46 94 357 116 -371 -296 -239 \n";
print INPUT_HMMS " - -82 -4184 -11010 -3059 -184 -701 -1378 * * \n";
print INPUT_HMMS " 327 -2388 405 -4027 -3431 -2323 -3842 508 336 -1311 509 1247 -567 -809 1632 -3206 -343 2252 564 -2797 -2433 1469\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 328 -4291 -4942 -4431 1657 -4244 -4925 3240 -4901 -1835 1189 -4081 -3618 -4930 -2663 2525 -4210 -4061 -4718 -4240 -322 1470\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 329 -2406 -2288 -4424 -3809 -114 -3915 415 596 -999 -1200 617 1728 -3969 -3156 -3388 -1750 3058 -733 -2740 -2389 1471\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 330 -5487 -4854 -7913 -7348 -3030 -7773 -6474 680 -7185 2908 2428 -7502 -6730 -5910 -6661 -7190 -5333 17 -4899 -5146 1472\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 331 2779 984 -5078 -4636 -3336 401 -3687 -463 -4316 -3234 -2562 -3969 -4316 -370 -4224 1063 -2857 421 -3805 -3475 1473\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 332 -4288 922 -4900 -3684 774 -4936 1283 -5133 3242 -4881 -4187 -3630 -4893 -2512 1931 -657 -4025 -4894 -4761 -4549 1474\n";
print INPUT_HMMS " - -149 -500 233 43 -381 398 105 -627 212 -464 -721 277 393 45 96 359 117 -370 -295 -250 \n";
print INPUT_HMMS " - -47 -4983 -11010 -1498 -631 -701 -1378 * * \n";
print INPUT_HMMS " 333 -6572 1653 -6985 -7335 3103 -6851 -3065 -5491 -6882 -4806 -4896 -5482 -6717 -382 -6254 -6102 -6434 -5644 -2312 4096 1478\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 334 -1283 -4805 -7759 -7155 1172 -7476 -6119 2123 -6931 2589 1082 -7191 -6572 -5726 -6419 -6804 -5226 -3186 -4730 -4929 1479\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 335 188 2769 -4745 -4111 -2201 -414 -2834 952 -3710 1175 3111 -3604 -4014 -340 -3516 -163 -636 -492 -2705 -2362 1480\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 336 -5570 -6508 -3357 3901 -7293 -5190 -4654 -7464 -840 -7148 -6681 -4067 -5718 -4404 -4900 -5274 -5645 -6982 -6627 -6404 1481\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 337 -2549 -2366 -4897 -4264 -2284 -4109 -2983 1032 -3863 2446 1238 -3755 -4148 -3479 -3663 -1126 661 294 -2832 858 1482\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 338 767 1331 -3761 -3230 -3134 635 -2939 -2706 -773 -3009 -2309 -3158 -3979 -2890 -3287 1660 2499 -674 -3531 -77 1483\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 339 -3695 -3421 -6056 -5434 -2700 -5359 -4207 1211 -5069 2747 2195 -5015 -5219 -4514 -4815 -1192 -3617 -782 -3766 -78 1484\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 340 -2565 1713 -4914 -4281 588 -4126 -3001 73 -3880 1071 2789 -3773 -4164 1569 -3679 -3214 -1120 2016 -2847 -2514 1485\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 341 -2989 1682 3207 1864 -4813 -3630 1245 -4589 -2281 -4533 -3661 -2251 -3885 -216 -2852 -931 -2959 -983 -4718 -3970 1486\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 342 -2310 -2736 -2921 -678 364 -3542 2514 117 -2219 -2622 284 -443 -793 -7 -2562 -303 -2250 -2197 -3114 3761 1487\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 343 -2180 -3652 2321 1549 -3973 -3153 248 -897 991 -3668 -2741 -1789 -795 707 803 -802 -490 -345 -3836 -3153 1488\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 344 -2428 947 -4774 -4138 2540 -3976 -2847 -461 -3733 403 3667 -3622 -4026 -3355 -3533 -1156 -720 -465 -2711 1681 1489\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 345 -349 -3081 -5844 -5297 -3250 -5213 -4268 1880 -4980 977 341 -4863 -5182 -4658 -4848 -174 -3343 2697 -4054 -3693 1490\n";
print INPUT_HMMS " - -149 -500 233 43 -381 398 105 -623 210 -466 -721 275 394 45 96 359 117 -367 -295 -249 \n";
print INPUT_HMMS " - -84 -4149 -11010 -109 -3781 -701 -1378 * * \n";
print INPUT_HMMS " 346 -903 -3649 -2029 50 -3968 595 3251 -3717 -240 -1611 1680 -1790 63 1236 539 687 -603 -3270 -3833 -3151 1492\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 347 282 -2268 -4563 560 1976 -3937 -2798 167 -970 164 -1470 -676 -3989 -3236 -3445 -3013 -830 798 -2723 2884 1493\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 348 -904 497 -2046 -1497 -3934 -3164 2105 -3674 180 83 -2719 -3 2095 -32 1131 1220 -858 -3241 -3817 -3143 1494\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 349 1073 -3022 -3335 -2764 -3224 -3721 -2617 -647 -2375 -3060 391 -2840 3504 -148 125 -936 -2558 -2616 -3530 -3107 1495\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 350 -4003 -4530 -5370 -5716 -5756 -4677 478 -6855 -6025 -6860 -6141 -5082 -5412 -5738 -5947 3711 -4447 -5734 -5973 -5455 1496\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 351 -1185 -3311 -2241 312 -430 -3258 1183 -3159 1635 833 1636 -1967 -3347 1993 -389 -2181 -607 -2859 1966 -149 1497\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 352 -2472 1592 -4819 -4186 -2247 -4028 -2903 1739 -3783 2171 1520 -3673 -4074 -440 -3585 -1041 -1023 861 -2765 -2423 1498\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 353 3408 844 -6263 -6367 -5265 -3976 -5299 -770 -5991 -5010 -4368 -4705 -4723 -5494 -5666 -64 -3418 -676 -5752 -5553 1499\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 354 3435 -3592 -6314 -6658 -6290 -3878 -5645 -6032 -6315 -6362 -5406 -4713 -4694 -5747 -5920 825 -3465 -1000 -6524 -6500 1500\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 355 2540 -3516 -4789 -4468 -5281 510 -4316 -4981 -863 -5198 1318 -3968 -4448 -4119 -4495 1668 1000 -4227 -5492 -5160 1501\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 356 3149 2712 -6384 -6733 -6322 -3876 -5665 -6146 -6348 -6412 -5435 -4724 -4694 -5771 -5937 1438 -3465 -4812 -6543 -6535 1502\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 357 -730 -2248 -891 -4129 1608 -3969 -2840 480 -3724 944 3131 -3614 -4018 -3347 -3525 -396 -2362 1065 -2706 1591 1503\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 358 -1520 3213 -4781 -4146 1945 -3985 -2845 646 -3741 -98 -1462 -3628 -4034 -395 -3541 -3070 -2378 -421 1127 3317 1504\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 359 -411 -3552 -6199 -5575 -233 -5515 -4355 1323 -5215 2570 478 -5175 -5339 -4622 -4947 -4644 1347 -2494 -3859 -3699 1505\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 360 2886 899 -6387 -6726 -6309 -763 -5655 -6131 -6336 -6394 -5418 -4718 -4688 -5759 -5929 1993 259 -4802 -6533 -6523 1506\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 361 -4137 -4487 -5180 -3911 -483 -4976 -3020 -4067 300 1311 1769 -3787 -4915 2535 2608 -4233 -3903 -4059 -4449 -4253 1507\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 362 -2196 2228 -2120 62 -402 -3200 -1867 -977 2443 -1900 -2594 -287 -3291 686 793 283 -639 -1138 -3714 599 1508\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 363 -2550 684 -4906 -4278 -221 -4123 -3008 2134 -3880 -1001 3573 -3769 -4166 -3508 -3686 -1185 958 1348 -2868 -2524 1509\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3008 -9968 -193 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 364 -1150 -930 -3207 -2657 -683 -2825 -1821 2150 -2347 1483 321 -2380 -2789 -2031 -2296 -1958 1565 642 -1637 -1343 1510\n";
print INPUT_HMMS " - -149 -500 235 43 -381 398 105 -627 210 -466 -721 277 393 45 98 359 117 -370 -295 -250 \n";
print INPUT_HMMS " - -2141 -378 -8018 -67 -4472 -32 -5518 * * \n";
print INPUT_HMMS " 365 -2651 -2880 -3618 -2963 -1182 -3913 165 -31 1602 2453 -2061 -471 -595 -2457 258 -2950 -2572 -2339 -3246 -2861 1512\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 366 -1224 -3653 807 -1478 -3974 1672 140 -3725 1383 -1516 -2742 2226 -965 181 239 -1286 -1170 -3275 -3836 -3153 1513\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 367 -2181 1180 -2037 285 -3945 516 1082 -1429 1217 288 -2724 476 -3251 1773 283 -358 -227 -341 -3821 -3144 1514\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 368 -2182 -3625 445 326 -45 2183 604 -3676 -1406 -1460 -2718 1564 -3253 516 -1911 -272 38 -1147 -3816 -530 1515\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 369 -2179 -3653 499 1338 -610 462 -1812 -3724 869 -3669 -2742 570 1608 567 -683 72 -127 -3275 -3836 664 1516\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -1506 -9968 -628 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 370 -1094 -2252 302 1530 510 -2123 -798 120 1210 -340 -1373 -818 -2213 1050 -920 -1043 427 178 -2510 -1905 1517\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -6 -8468 -9510 -894 -1115 -42 -5111 * * \n";
print INPUT_HMMS " 371 -3456 813 -6422 -6408 -3732 -4482 -4770 31 -5882 -3943 -3738 -5008 -5117 -5482 -5606 -3835 -760 -3146 6058 -3678 1518\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 372 -913 -3901 953 -641 -4255 -838 -2099 -4008 -1730 -3964 -3056 2341 -3492 -1654 -2251 1170 2200 -332 -4144 -3452 1519\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 373 242 -3653 170 158 -3974 178 -1812 -3724 6 -104 -2742 -76 2397 698 -429 366 -1044 -3275 -3836 -3153 1520\n";
print INPUT_HMMS " - -145 -501 232 44 -381 398 105 -627 211 -467 -721 276 393 44 95 358 118 -368 -295 -250 \n";
print INPUT_HMMS " - -82 -4184 -11010 -1926 -441 -701 -1378 * * \n";
print INPUT_HMMS " 374 -200 1650 -3564 -2986 -520 -3733 -2539 -2027 857 -2350 620 791 -3804 -2599 -2966 -336 2917 -92 -2912 -2525 1525\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 375 -2440 1860 -4746 -4113 -230 -3984 1853 -1753 -3716 2467 993 -3617 -4032 1116 -3529 -398 -2381 -654 -2725 -2382 1526\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 376 -2334 -3626 -2230 2029 -3894 -3314 591 1085 608 -3607 -2734 -1978 -489 2308 -1961 -2246 -2268 1267 -3830 -3207 1527\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 377 -2748 409 -2815 130 2285 -3731 3870 -3665 -332 -3709 -2914 -2434 -3799 83 -391 -2702 -2661 -3377 -3762 2450 1528\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 378 -5560 -4966 -6493 -6426 32 -6338 3332 -619 -146 -4438 -4274 -5178 -6264 -5142 -5471 -1248 -5455 -4794 -2351 4208 1529\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 379 -2602 1338 -4591 -4063 -2901 -3891 -3237 -2447 -3735 -784 1369 -3661 -4168 390 -3725 2584 2294 -2313 -3378 -3030 1530\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2144 -9968 -372 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 380 -1882 -1908 -3561 -3291 929 2968 -1977 -1131 -3039 1063 -739 -2801 -3305 -2664 -2957 -2313 -1974 -1292 -1628 -822 1531\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -9 -7833 -8875 -894 -1115 -36 -5350 * * \n";
print INPUT_HMMS " 381 -897 -3935 -3117 -2971 -5331 3390 974 -5090 -621 -5118 -4236 -481 -4253 -3014 -3504 -201 -1187 -4386 -5291 -4728 1532\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 382 -476 -4861 -6584 -6605 137 -6312 473 75 -6198 -4358 -4169 -546 -6248 -5259 -5757 -5503 -5374 -4650 -2339 4567 1533\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -47 -9968 -5007 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 383 -1238 -3626 1074 218 -3947 -3123 -1784 -3698 634 -3642 -734 336 -3218 513 -1874 1756 2159 -3248 -3810 -3126 1534\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 384 331 -3590 -2003 2620 -3899 -950 -1783 -178 955 -3601 278 -1763 -688 519 -1873 -204 -748 -3206 -3780 103 1535\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 385 550 -3615 1083 1577 -3936 -3116 499 -947 490 -3631 539 270 -3209 717 -321 830 -2 -3237 -3799 -151 1536\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 386 -670 -3687 2017 1683 -4006 -3159 1127 -3758 -384 -3702 -2778 -1792 -3264 2459 -1936 689 -2149 -1255 -3869 -3182 1537\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 387 -4578 -4060 140 -6723 -3517 -6932 -6309 1686 -6621 2788 -2275 -6602 -6453 -6019 -6486 -6280 -4529 472 -5260 -5181 1538\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 388 51 -2264 -4277 -251 -423 -3858 1197 978 402 1008 2644 -3355 -725 358 -3303 -2923 -2303 255 -2714 835 1539\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 389 204 -3032 966 1536 -3146 -3321 -2021 -763 -1761 -1024 -204 -2109 2623 -1691 -2198 361 -2154 -701 -3357 -2831 1540\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -1363 -710 * * \n";
print INPUT_HMMS " 390 -266 3489 -4724 -4088 614 -3927 338 115 -3683 1239 -1409 -3573 -1209 -3306 -3483 -3012 -1072 1871 -2664 274 1541\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9923 -10965 -894 -1115 -402 -2040 * * \n";
print INPUT_HMMS " 391 1480 2514 -4609 -3985 -2233 -3950 -2818 -420 -949 -2124 2888 -3546 -4004 -419 -3470 -18 -2363 2039 -2733 -2387 1542\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 392 -624 -3652 -495 244 -3973 -952 1392 -897 1771 -3668 -2741 -1789 -3246 1888 1576 111 -637 -1081 -3835 -188 1543\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 393 -890 -2414 -3902 -3303 -280 -3832 3002 1092 1229 1338 1240 -3162 -3891 375 387 -2875 -2345 -1840 -2850 -2481 1544\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 394 -5142 775 -7510 -6900 -2916 -7118 -5807 2022 -6640 2129 3551 -6815 -6393 -5569 -6186 -6383 -5001 -3118 1245 -4738 1545\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 395 1861 -2273 -4527 -3906 -2231 -3932 1302 256 -3550 459 2197 1694 -3984 -3216 -717 -1051 -2351 581 -2727 -2380 1546\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 396 -1102 -3653 1059 1398 682 -1385 2211 -3725 2094 -3669 -2742 -269 -3246 680 -683 -1019 -2119 -3275 -3836 -290 1547\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -384 -9968 -2105 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 397 -2094 2212 -4397 -3764 -1880 -3637 -2506 -11 -3368 1127 1597 2482 -3687 -210 -3183 -2720 -278 -444 -2384 2043 1548\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9587 -10629 -894 -1115 -1720 -522 * * \n";
print INPUT_HMMS " 398 -2460 1916 -4814 -4190 -2188 -4048 608 684 -3794 2008 -1380 -3693 -4077 -306 -3602 -3142 -2401 2286 -2776 -2441 1549\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -645 -9685 -1477 -894 -1115 -132 -3510 * * \n";
print INPUT_HMMS " 399 -486 -1899 -3760 -599 -130 -3448 919 588 -472 922 -1098 -171 -3504 -2587 -2857 -820 1460 1567 1451 -1988 1550\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9464 -10506 -894 -1115 -3425 -141 * * \n";
print INPUT_HMMS " 400 -1824 -3099 621 -1203 1287 -2827 2868 -3046 1833 -1819 856 -1496 -2917 56 316 -1744 -1762 -2683 -3311 2008 1551\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -106 -9464 -3842 -894 -1115 -2565 -267 * * \n";
print INPUT_HMMS " 401 -1778 -2874 -172 -1250 -3061 -2818 1391 413 568 -122 -2001 -1527 -2907 1314 -42 1026 -1717 1809 -3143 -2554 1552\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9417 -10459 -894 -1115 -984 -1017 * * \n";
print INPUT_HMMS " 402 10 -3464 -1843 -66 -3787 -2967 -1621 -3535 1783 -3478 -2554 2462 -3060 134 328 1346 -1934 -768 -3643 -2965 1553\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9712 -10754 -894 -1115 -142 -3411 * * \n";
print INPUT_HMMS " 403 850 -3652 942 799 213 -1572 452 -3723 -788 -3668 -2741 1009 -64 1375 41 -129 -2118 229 -3835 572 1554\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -82 -9968 -4203 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 404 859 -3618 -1983 -428 -3944 1519 -1776 -3693 1064 -3636 -2711 1096 1165 -1317 1168 346 -2089 -3244 -3801 -3121 1555\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9888 -10930 -894 -1115 -1718 -523 * * \n";
print INPUT_HMMS " 405 -2114 -3585 721 635 -263 -175 1634 -3656 -265 458 -2674 -381 1132 453 -1031 340 662 -3207 1214 -3086 1556\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9888 -10930 -894 -1115 -304 -2395 * * \n";
print INPUT_HMMS " 406 -795 -3648 937 -563 -3967 279 -1813 -1089 -359 -1552 -2738 569 -3247 4 -458 1148 2199 -1062 -3833 -3151 1557\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 407 -2192 -3660 -2042 139 -3981 -3166 1963 -161 2883 -3674 -2750 306 -3258 737 251 -948 -492 -1155 -3842 -3162 1558\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 408 -4577 -4197 -6180 -5962 1099 -1155 3857 -3829 -5560 2332 -3444 -4907 -5728 -4851 -5231 -1332 -4510 -3813 -2393 -89 1559\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 409 -976 623 1014 228 -3809 -3184 421 77 1388 -215 192 474 -3276 -1406 -520 -154 1162 -594 -3752 73 1560\n";
print INPUT_HMMS " - -149 -500 233 43 -381 400 105 -627 212 -466 -721 275 393 45 96 359 119 -370 -295 -250 \n";
print INPUT_HMMS " - -42 -5144 -11010 -1489 -636 -701 -1378 * * \n";
print INPUT_HMMS " 410 2446 -3300 -2501 -4 -3610 639 -2187 -3262 -1878 -1410 -2585 -372 -3514 -1813 -2336 1068 442 -592 -3737 -3175 1564\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 411 -4089 -3638 -6684 -6268 1424 -6336 -5758 2302 -6108 17 -2750 -1688 -6135 -5857 -6098 -5604 -4063 2873 -5272 -4872 1565\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 412 -2597 -2562 -4191 -3592 1749 -4025 1948 -528 1297 -508 -1761 -3379 -4078 -3036 2312 -1024 -2534 -1995 2066 1754 1566\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 413 -2184 -3655 -2031 178 -3976 -1299 -1815 -3726 1586 -723 -2744 2043 -3250 738 1847 223 0 -3277 -3838 -424 1567\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 414 -4759 -6029 -512 -3024 -6659 -4662 -3532 -6304 3929 -5973 -5382 -3304 -5066 -1142 -2840 -4453 -4685 -5936 -5852 -5420 1568\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 415 -6656 -5569 -7013 -7375 489 -6871 -3108 -5557 -6942 -4857 -4957 -5528 -6746 -5670 -6304 -6167 -6512 -5715 -2355 4852 1569\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9968 -11010 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 416 1380 -3745 -1097 -1553 -620 -3225 -1912 -3815 737 -3766 -2847 143 -3337 1395 -2013 2492 -2226 -3370 -3938 -3255 1570\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 417 -2192 -3665 -509 231 -3985 -3157 2661 -3736 994 -3680 -2755 -1792 -3254 122 -1912 2331 955 -1108 -3848 -3165 1571\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 418 -2162 669 -559 241 -3956 -3136 622 -3707 952 -1626 -2725 -179 1102 -10 1012 2153 -1197 -3257 -3819 -3136 1572\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 419 -2379 -3482 -2408 49 -3699 -1190 -2025 -149 2687 -3435 -2607 -2098 -3478 -1621 2009 -2335 -640 624 -3715 117 1573\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 420 -2406 -2596 -3406 -825 3234 -3730 1830 -2158 -2607 579 563 -555 -3796 -164 92 -2740 -2345 -2040 -2923 1808 1574\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 421 170 458 -4665 -4035 2103 1277 644 -1731 71 945 2510 -3558 -3989 -3285 -3475 -3019 -2340 -1652 -2692 840 1575\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 422 -273 792 -2015 1287 -3943 -850 1769 -3690 2079 -1496 274 -1776 -3232 591 1018 -768 -2103 -3246 -3812 894 1576\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 423 1052 765 -6517 -6172 -4181 -5656 -5635 2289 -5987 -3235 -3024 -5646 -5800 -5778 -5965 -1283 -3857 2869 -5386 -4955 1577\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 424 2413 -3697 -4964 -5026 -5515 -3929 -4730 -5663 -854 -5833 -4989 -4276 -4662 -4657 -4619 2715 -3488 -4676 -5766 907 1578\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 119 -369 -294 -249 \n";
print INPUT_HMMS " - -35 -5412 -10989 -230 -2765 -701 -1378 * * \n";
print INPUT_HMMS " 425 -818 159 -3231 -2661 521 -1094 -2397 588 1457 729 356 -700 -3698 519 592 -859 1258 -2000 -2968 -35 1580\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 426 -2405 446 -4743 -4107 1657 -3952 -2823 2666 -947 938 699 -3595 -4002 626 -3506 -3036 445 -1644 -2689 -310 1581\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 427 -455 -3132 -2405 563 -3284 -3325 -2038 -2913 -441 -3085 1109 -2105 2793 -1687 -2198 468 130 1346 -3462 -2920 1582\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 428 398 719 -3078 -817 509 -3580 2226 -671 -2355 -2500 1378 -2612 1466 1850 -611 -987 836 60 -3023 -2598 1583\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 429 860 -3611 1382 139 -3921 -3143 -1803 -3663 712 1664 26 -182 -3236 657 -1894 -668 -2105 -1168 -3801 -3126 1584\n";
print INPUT_HMMS " - -149 -500 234 44 -381 398 105 -627 211 -467 -721 275 397 45 95 360 117 -370 -295 -250 \n";
print INPUT_HMMS " - -287 -2474 -10989 -37 -5288 -701 -1378 * * \n";
print INPUT_HMMS " 430 -928 -3628 1237 276 -3946 -597 957 -966 392 -1534 -279 1441 -3231 3 -996 -780 -2102 -1265 4176 -3133 1586\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 431 66 2291 -988 -4090 1101 -3945 -2815 1135 -964 649 1134 -3584 -3995 -3316 -3497 1250 -524 906 -2686 -2344 1587\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9947 -10989 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 432 132 -3590 -1092 1039 -634 -3148 -1809 -3627 1010 1752 -2685 -1791 -4 2 110 -1081 -585 -608 -3786 -3116 1588\n";
print INPUT_HMMS " - -149 -504 244 41 -381 396 107 -627 208 -466 -724 276 392 44 96 359 117 -371 -298 -244 \n";
print INPUT_HMMS " - -194 -2997 -10989 -2915 -205 -701 -1378 * * \n";
print INPUT_HMMS " 433 -522 -2746 -701 -711 -233 -3497 -2232 447 1920 642 333 -2436 -3574 -185 -2498 306 841 525 -3126 -2673 1607\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9914 -10956 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 434 -153 -2228 -4468 -3848 -64 -1233 -2741 1332 -893 724 590 469 -3935 518 -3379 26 -620 1857 -2682 -2334 1608\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9880 -10922 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 435 -2107 -3580 -687 2124 -3901 -3081 1384 -825 1136 -3596 -2669 -378 -3174 396 769 350 844 -453 -3763 -3081 1609\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -2 -9782 -10824 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 436 -111 685 1689 1676 -3824 -412 578 -3574 800 -3518 -2592 722 -3096 -1201 837 531 -1968 -3124 -3686 -3003 1610\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9734 -10776 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 437 -767 -2098 -4149 -3538 -177 -3702 1098 1491 -3216 1507 1428 974 293 -2912 -585 387 -449 -1515 -2548 -2196 1611\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9538 -10580 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 438 1573 -1962 -3813 -3211 108 893 1544 -1471 -2918 866 1108 -2955 -3564 -28 -2914 453 -144 -194 -2409 -2051 1612\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9484 -10526 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 439 932 -3263 -1640 -59 -3583 -2766 849 -451 651 -3278 -2352 1167 -2860 1389 1123 740 -132 -2884 -3446 995 1613\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -3 -9383 -10425 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 440 146 1926 1089 -1213 -3039 -2784 -1462 -432 -1117 -2808 1016 1638 1122 -1063 786 811 -1684 -2399 -3118 428 1614\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -9215 -10257 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 441 779 -1709 691 -2908 -1676 -397 -2075 768 -2623 1665 1145 -2670 -3296 219 -2633 -444 -1709 550 -2155 -1796 1615\n";
print INPUT_HMMS " - -149 -500 233 43 -381 399 106 -626 210 -466 -720 275 394 45 96 359 117 -369 -294 -249 \n";
print INPUT_HMMS " - -4 -9215 -10257 -894 -1115 -701 -1378 * * \n";
print INPUT_HMMS " 442 -856 1044 -2063 -61 185 -288 1011 -889 36 301 2817 167 -28 -1295 -1778 -64 815 -1760 -2638 -2156 1616\n";
print INPUT_HMMS " - * * * * * * * * * * * * * * * * * * * * \n";
print INPUT_HMMS " - * * * * * * * * 0 \n";
close(INPUT_HMMS);
# RECORD THE POSITIONS OF THE HMMs IN $input_hmms:
($hmm_pos_file,$TAKE_FAMILY,$errorcode,$errormsg) = &find_pos_of_hmms($input_hmms,$outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
# RUN FORMATDB ON THE SCAFFOLDS:
$cmd = "$blast_path/formatdb -i $input_fasta -p F -o T\n";
system "$cmd";
# RECORD THE POSITION OF THE SCAFFOLDS IN $input_fasta:
($scaffold_pos_file,$errorcode,$errormsg) = &find_pos_of_scaffolds($input_fasta,$outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
# RUN GENEWISE:
($errorcode,$errormsg) = &run_genewise_on_scaffolds($outputdir,$input_fasta,$input_hmms,$output,'no','none',$fam_seqs,0.05,25000,1,$hmm_pos_file,
$blast_path,$scaffold_pos_file,$TAKE_FAMILY);
if ($errorcode != 0) { print STDERR "ERROR: test_run_genewise_on_scaffolds: failed test1\n"; exit;}
# WRITE A FILE WITH THE EXPECTED OUTPUT:
($expected_output,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(EXPECTED,">$expected_output") || die "ERROR: test_run_genewise_on_scaffolds: cannot open $expected_output\n";
print EXPECTED "TF101001\n";
print EXPECTED "V:15395346..15397430 GeneWise match 2 1681 514.02 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise cds 2 11 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 12 342 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise cds 343 396 0.00 + 2 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 397 448 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise cds 449 543 0.00 + 2 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 544 594 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise cds 595 1017 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 1018 1066 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise cds 1067 1560 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 1561 1605 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise cds 1606 1681 0.00 + 1 ID=V:15395346..15397430-TF101001-genewise-prediction-1\n";
print EXPECTED "V:15395346..15397430 GeneWise match 37437 63766 -315.16 + . ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise cds 37437 62083 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 62084 62744 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise cds 62745 63102 0.00 + 1 ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 63103 63151 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise cds 63152 63645 0.00 + 0 ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise intron 63646 63690 0.00 + . ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise cds 63691 63766 0.00 + 1 ID=V:15395346..15397430-TF101001-genewise-prediction-2\n";
print EXPECTED "V:15395346..15397430 GeneWise match 64165 64167 0.12 - . ID=V:15395346..15397430-TF101001-genewise-prediction-3\n";
print EXPECTED "V:15395346..15397430 GeneWise cds 64165 64167 0.00 - 0 ID=V:15395346..15397430-TF101001-genewise-prediction-3\n";
print EXPECTED "//\n";
close(EXPECTED);
$differences = "";
open(TEMP,"diff $output $expected_output |");
while(<TEMP>)
{
$line = $_;
$differences = $differences.$line;
}
close(TEMP);
$length_differences = length($differences);
if ($length_differences != 0) { print STDERR "ERROR: test_run_genewise_on_scaffolds: failed test1 (files $output $expected_output)\n"; exit;}
# DELETE TEMPORARY FILES:
system "rm -f $output";
system "rm -f $expected_output";
system "rm -f $input_hmms";
system "rm -f $fam_seqs";
system "rm -f $hmm_pos_file";
system "rm -f $input_fasta";
# DELETE THE FORMATDB OUTPUT FILES:
$formatdbfile = $input_fasta.".nhr";
system "rm -f $formatdbfile";
$formatdbfile = $input_fasta.".nin";
system "rm -f $formatdbfile";
$formatdbfile = $input_fasta.".nsd";
system "rm -f $formatdbfile";
$formatdbfile = $input_fasta.".nsi";
system "rm -f $formatdbfile";
$formatdbfile = $input_fasta.".nsq";
system "rm -f $formatdbfile";
# DEFINE THE OUTPUT FILE NAME FOR GENEWISE OUTPUT:
($output,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
@temp = split(/\//,$output);
$output = $temp[$#temp];
# WRITE A FILE WITH THE INPUT SEQUENCES IN THE FAMILY:
($fam_seqs,$errorcode,$errormsg) = &make_filename($outputdir);
if ($errorcode != 0) { ($errorcode,$errormsg) = &print_error($errormsg,$errorcode,0); }
open(FAM_SEQS,">$fam_seqs") || die "ERROR: test_run_genewise_on_scaffolds: cannot open $fam_seqs\n";
print FAM_SEQS "TF101526\n";
print FAM_SEQS ">At1g29550.1\n";
print FAM_SEQS "MVVTDSPVSGIMADQNIDPNTTTSPSPKEKHVSAIKAISGDEKAPSKEKKNYASKKSTTVIQKSHCFQNSWTFWFDNPSSKSNQVIWGSSLRSLYTFGTIEEFWSLYNNIHPPTKWVSGADLYCFKDKIEPKWEDPICANGGKWSMMFPKATLECNWLNTLLALVGEQFDQGDEICGAVLNFRARGDRISLWTKNAANEEAQLSIGKQWKELLGYNETIGFIVHEDAKTLDRD
AKRRYTV\n";
print FAM_SEQS ">At1g29590.1\n";
print FAM_SEQS "MEQYWALYKELTLSHLRLLYWERTRRSIVNGKITVKRAREKEKSEMVVMDSPVSGRMADQNIDPNTTTSPSPIEKHVSAIKAISGDEKAPSKEKKNYASKKSTTVIQKSHCFQNSWTFWFDNPSSKSNQVIWGSSLRSLYTFATIEEFWSLYNNIHPPTKWVSGSDLYCFKDKIEPKWEDPICANGGKWTMFFPRATLESNWLNTLLALVGEQFDQGDEICGAVLNFRTRGDR
ISLWTKKAANEEAQLSIGKQWKELLGYNDTIGFIVHEDAKTLDRDAKRRYTV\n";
print FAM_SEQS ">At4g18040.1\n";
print FAM_SEQS "MAVEDTPKSVVTEEAKPNSIENPIDRYHEEGDDAEEGEIAGGEGDGNVDESSKSGVPESHPLEHSWTFWFDNPAVKSKQTSWGSSLRPVFTFSTVEEFWSLYNNMKHPSKLAHGADFYCFKHIIEPKWEDPICANGGKWTMTFPKEKSDKSWLYTLLALIGEQFDHGDEICGAVVNIRGKQERISIWTKNASNEAAQVSIGKQWKEFLDYNNSIGFIIHEDAKKLDRNAKNAY
TA\n";
print FAM_SEQS ">At5g35620.1\n";
print FAM_SEQS "MATDDVNEPLPAAAELPATEAEKQPHKLERKWSFWFDNQSKKGAAWGASLRKAYTFDTVEDFWGLHETIFQTSKLTANAEIHLFKAGVEPKWEDPECANGGKWTWVVTANRKEALDKGWLETLMALIGEQFDEADEICGVVASVRPQSKQDKLSLWTRTKSNEAVLMGIGKKWKEILDVTDKITFNNHDDSRRSRFTV\n";
print FAM_SEQS ">CBG06370\n";
print FAM_SEQS "MTTTVAANSAVTAVGADGKTETSIPPELLTRHPLQNRWALWYLKADRNKEWEDCLKMVSLFDTVEEFWSLYNHIQSAGGLNWGSDYYLFKEGIKPMWEDVNNVQGGRWLVVVDKQRRTQLLDHYWLELLMAIVGEQFDEFGEYVCGAVVNVRQKGDKVSLWTRDATRDDVNLRIGQILKQKLSIPDTDILRYEVHKDSSARTSSTVKPRICLPAKEPAPAKDKTSSPSTATAG
SPTPTTPTP\n";
print FAM_SEQS ">CBG08171\n";
print FAM_SEQS "MGGQTQNVHTFTGIGEFWALHDAIKPPSGLNPSSDYNVFRDGIAPMWEVKENKNGGRWLITIEKRTSEIMDLIWTEILMAMVGEQFKQDSESVCGMVCNVRTKGSKISVWTTDSSDDEANLRIGNVLKTVLNNASMIHQRPLFDVLRYEDHESCQKKTSSGVKAKHSIFAVEEREEKPASVAATPAPTESTD\n";
print FAM_SEQS ">CBG08188\n";
print FAM_SEQS "MAEIAETPQKKSPLVYKLARSWSWWFLSDDRNKSWEDRLKNVHTFTGIGEFWALHDAIKPPSGLNPSSDYNVFRDGIAPMWEVKENKNGGRWLITIEKRTSEIMDLIWTEILMAMVGEQFKQDSESVCGMVCNVRTKGSKISVWTTDSSDDEANLRIGNVLKTVLNNASMIHQRPLFDVLRYEDHESCQKKTSSGVKAKHSIFAVEEREEKPASVAATPAPTESTD\n";
print FAM_SEQS ">CBG24279\n";
print FAM_SEQS "MTEHEEESNHSSSALYPLKRHWTWWYLNDERTKSWEDRLKKVYTFSTVPEFWALYDAIRPPSGLNPMCDYNVFRDDIQPMWEVPENANGGRWLIAVDKSKQDMVDAIWLEILMALVGEQFGKDMESICGLVCNVRGKGSKISVWTKDCNDDETNLRIGVVLKEKLMAASKDLTKPLFDVIRYEDHDSCQKKTSSLVKAKLSLHSAENPEKPVGSL\n";
print FAM_SEQS ">DDB0184085\n";
print FAM_SEQS "MNQQGLSYTDQMEIQAKSNQTPPVHQLDATWTLFTDKKQYQSNTATSHQDYLSTLTNIGSFSSVEDFWGYYHQLQRPSKMQADTTYHLFKSGISPTWEDPENIKGGKWVINFQKSTRFIFNVDLIWEDIVLGVVGETIDIDRDICGVVLSKRDQAERIAIWNKDCSNEKNIEQLKINIMNTIAQGCQGADLNKLNIRYQSHSTFSSHNTTPTITPSSSSTSLSSLAGSTNSTT
ATATTTPFYKSNSNSSSNNLNLLANSGNNVNTNQTQQQQQQQQSLPNSTSKSDNLNNSGSNSLTSSNENVSVNENTSKAN\n";
print FAM_SEQS ">DDB0218641\n";
print FAM_SEQS "MNSWSLESETDTASFINSELAIEKLKDLLLKENQIQKYNDEDDIDGEVDDEDDNEDDNEEEEEEEDLDYEEDDEDDYDEEEEEEDKLTNEEIEDEGEEDGGAEEEEIEEELLPISSPTSSTTTPDIIPESSLDKEDDKQISTENNNNNQKKPIDLNEPAYLEYEWVFYYDDSTLKGQNSEDYQSYIKNLGSFNTVQGFWEYWNNIINSSMFPDGANLRLFKQGIAPMWEDPCN
ENGGKWTLSCYREQSHNIALKSLLALIGEQLDHSHDICGFVLSVRASRHVISIWNKSGDNKEIHDRVSEQLKECVFGRVFKYYPHKQFSGSVPQSPMTPSVSSNNLSSYNNNNNNNSSTPMKREYSSPMISSNNGGHNYNNNNYNNNRLSNSCNINSDSKEDNNSNSNIENNNNNNQCNSNNLISSFENENDRKETFRHKKSQSTSSIYGSSIKSPLSNSSNNSNYFNSNNNNNNNNNTNNNSNCNNNNNNN
NNNNNNNNNTPLKLSRDNSYNNNNSSFNNNGRLRKENSKSNILSSKDSKLDENSIAVQQKQPQPQPQTQTQTQPQTQPQPQLQQQQTPQKKLYKNESRDKINFHSNSSKPPLRDRNNNHTLNTTQSVNETITTSSSSSSSSSPASSPSLLLSSSTNINTPIELDVIKKEEKKEKKGEKEEKEEKEEKEDDIIKKNETEEESITDEILSDSNISTPIGSNVNDDIERGCLFNSNEEKIIDSSPNENEGSDNFT
IDELVENISEVSDFHTDESSSVSLKSGSNCNQKSKKKKSKQNKSSSSSNNINTNSSGKVLSSPSSSSKVNSKPSTNVRKNSKVNSKNQSHTKGKFLSYENDNSLGDKNSSFFNSPTFKFCKEHFVVIIMIFAIVSITVILQK\n";
print FAM_SEQS ">AAEL001916-RB.1\n";
print FAM_SEQS "MAGKSNEEVEKQTENTEQNHAEQGAVVDPECLIKHPLQATWTLWYQEPDRSKSWEDTLNEVTSFSTVEDFWSLYNHIKSPADIKVGSDYSLFKKDIRPMWEDEGNKRGGRWMVNVPRSQRQDLDKYWLDTILCLIGEAFESSDEICGAVVNVRPKGDKIAIWTANFQNREAVINIGRIYKERLGLKAPLTYHLHKDTMVKSGSSVKAVYTL\n";
print FAM_SEQS ">AGAP007172-RA.1\n";
print FAM_SEQS "MYSGRIAFQKPSSLGRLHSWPDRNGPNGRWNNSLRVVVPANNYLSQQQQQNENETTEQSQELAEQSNAPESIDPECLIKHPLQHTWTLWYLEVDRTKKWTDSMNEVTSFSTVEDFWSLFNHIRGPSEIKVGGDYMLFKSHIRPMWEDDANKHGGRWTISMNKRLSDKCWLDTVLCLIGETFEHSDQICGATVNVRQKIDKISIWTADYDNRAAVLDIGRTYKERLGLRENIYY
QMHKDTMVKLSSSGTKSTYTV\n";
print FAM_SEQS ">At1g29550.1\n";
print FAM_SEQS "MVVTDSPVSGIMADQNIDPNTTTSPSPKEKHVSAIKAISGDEKAPSKEKKNYASKKSTTVIQKSHCFQNSWTFWFDNPSSKSNQVIWGSSLRSLYTFGTIEEFWSLYNNIHPPTKWVSGADLYCFKDKIEPKWEDPICANGGKWSMMFPKATLECNWLNTLLALVGEQFDQGDEICGAVLNFRARGDRISLWTKNAANEEAQLSIGKQWKELLGYNETIGFIVHEDAKTLDRD
AKRRYTV\n";
print FAM_SEQS ">At1g29590.1\n";
print FAM_SEQS "MEQYWALYKELTLSHLRLLYWERTRRSIVNGKITVKRAREKEKSEMVVMDSPVSGRMADQNIDPNTTTSPSPIEKHVSAIKAISGDEKAPSKEKKNYASKKSTTVIQKSHCFQNSWTFWFDNPSSKSNQVIWGSSLRSLYTFATIEEFWSLYNNIHPPTKWVSGSDLYCFKDKIEPKWEDPICANGGKWTMFFPRATLESNWLNTLLALVGEQFDQGDEICGAVLNFRTRGDR
ISLWTKKAANEEAQLSIGKQWKELLGYNDTIGFIVHEDAKTLDRDAKRRYTV\n";
print FAM_SEQS ">At4g18040.1\n";
print FAM_SEQS "MAVEDTPKSVVTEEAKPNSIENPIDRYHEEGDDAEEGEIAGGEGDGNVDESSKSGVPESHPLEHSWTFWFDNPAVKSKQTSWGSSLRPVFTFSTVEEFWSLYNNMKHPSKLAHGADFYCFKHIIEPKWEDPICANGGKWTMTFPKEKSDKSWLYTLLALIGEQFDHGDEICGAVVNIRGKQERISIWTKNASNEAAQVSIGKQWKEFLDYNNSIGFIIHEDAKKLDRNAKNAY
TA\n";
print FAM_SEQS ">At5g35620.1\n";
print FAM_SEQS "MATDDVNEPLPAAAELPATEAEKQPHKLERKWSFWFDNQSKKGAAWGASLRKAYTFDTVEDFWGLHETIFQTSKLTANAEIHLFKAGVEPKWEDPECANGGKWTWVVTANRKEALDKGWLETLMALIGEQFDEADEICGVVASVRPQSKQDKLSLWTRTKSNEAVLMGIGKKWKEILDVTDKITFNNHDDSRRSRFTV\n";
print FAM_SEQS ">B0348.6a.1.1\n";
print FAM_SEQS "MSTSVAENKALSASGDVNASDASVPPELLTRHPLQNRWALWYLKADRNKEWEDCLKMVSLFDTVEDFWSLYNHIQSAGGLNWGSDYYLFKEGIKPMWEDVNNVQGGRWLVVVDKQRRTQLLDHYWLELLMAIVGEQFDEYGDYICGAVVNVRQKGDKVSLWTRDATRDDVNLRIGQVLKQKLSIPDTEILRYEVHKDSSARTSSTVKPRICLPAKDPAPVKEKGPAATTSPSN
PGTEATGTSPATPTP\n";
print FAM_SEQS ">CBG06370\n";
print FAM_SEQS "MTTTVAANSAVTAVGADGKTETSIPPELLTRHPLQNRWALWYLKADRNKEWEDCLKMVSLFDTVEEFWSLYNHIQSAGGLNWGSDYYLFKEGIKPMWEDVNNVQGGRWLVVVDKQRRTQLLDHYWLELLMAIVGEQFDEFGEYVCGAVVNVRQKGDKVSLWTRDATRDDVNLRIGQILKQKLSIPDTDILRYEVHKDSSARTSSTVKPRICLPAKEPAPAKDKTSSPSTATAG
SPTPTTPTP\n";
print FAM_SEQS ">CBG08171\n";
print FAM_SEQS "MGGQTQNVHTFTGIGEFWALHDAIKPPSGLNPSSDYNVFRDGIAPMWEVKENKNGGRWLITIEKRTSEIMDLIWTEILMAMVGEQFKQDSESVCGMVCNVRTKGSKISVWTTDSSDDEANLRIGNVLKTVLNNASMIHQRPLFDVLRYEDHESCQKKTSSGVKAKHSIFAVEEREEKPASVAATPAPTESTD\n";
print FAM_SEQS ">CBG08188\n";
print FAM_SEQS "MAEIAETPQKKSPLVYKLARSWSWWFLSDDRNKSWEDRLKNVHTFTGIGEFWALHDAIKPPSGLNPSSDYNVFRDGIAPMWEVKENKNGGRWLITIEKRTSEIMDLIWTEILMAMVGEQFKQDSESVCGMVCNVRTKGSKISVWTTDSSDDEANLRIGNVLKTVLNNASMIHQRPLFDVLRYEDHESCQKKTSSGVKAKHSIFAVEEREEKPASVAATPAPTESTD\n";
print FAM_SEQS ">CBG24279\n";
print FAM_SEQS "MTEHEEESNHSSSALYPLKRHWTWWYLNDERTKSWEDRLKKVYTFSTVPEFWALYDAIRPPSGLNPMCDYNVFRDDIQPMWEVPENANGGRWLIAVDKSKQDMVDAIWLEILMALVGEQFGKDMESICGLVCNVRGKGSKISVWTKDCNDDETNLRIGVVLKEKLMAASKDLTKPLFDVIRYEDHDSCQKKTSSLVKAKLSLHSAENPEKPVGSL\n";
print FAM_SEQS ">DDB0184085\n";
print FAM_SEQS "MNQQGLSYTDQMEIQAKSNQTPPVHQLDATWTLFTDKKQYQSNTATSHQDYLSTLTNIGSFSSVEDFWGYYHQLQRPSKMQADTTYHLFKSGISPTWEDPENIKGGKWVINFQKSTRFIFNVDLIWEDIVLGVVGETIDIDRDICGVVLSKRDQAERIAIWNKDCSNEKNIEQLKINIMNTIAQGCQGADLNKLNIRYQSHSTFSSHNTTPTITPSSSSTSLSSLAGSTNSTT
ATATTTPFYKSNSNSSSNNLNLLANSGNNVNTNQTQQQQQQQQSLPNSTSKSDNLNNSGSNSLTSSNENVSVNENTSKAN\n";
print FAM_SEQS ">ENSBTAT00000004037.4\n";
print FAM_SEQS "SEGRGSPPSLTPLLGQAEEAEDGIQKWKKEDEKEEEEAGAGPCMGEEALRKTPEEGKPDLHPLLNRWALWFFKNDRSRAWQNNLHRVTKFNTVEDFWAIYNNIQLASKLSSGCDYALFKDGIKPMWEDSRNKRGGRWLVSLTKQQRHIELDHLWLETLLCLIGESFGEHSQEVCGAVINIRAKGDKIAVWTREAENQEGVLHIGRVYKERLGLSTKTIIGYQAHADTATKSNS
LAKNKFVV\n";
print FAM_SEQS ">ENSBTAT00000025111.4\n";
print FAM_SEQS "LLFGFCLPRSLPGATAAECASNLKKIYTVQTVQIFWSVYNNIPPVTSLPLRCSYHLMRGERRPLWEEESNAKGGVWKMKVPKDSTSTVWKELLLATIGEQFTDCAAADDEVIGVSVSVRDREDVVQVWNVNAALVGEATVLEKIYELLPHISFKAVFYKPHEEHHAFEGGRGKH\n";
print FAM_SEQS ">ENSBTAT00000048285.2\n";
print FAM_SEQS "LASVLPETTPTPNPPPTEEEKTESNQEVANPEHYIKHPLQNRWALWFFKNDKSKTWQANLRLISKFDTVEDFWALYNHIQLSSNLMPGCDYSLFKDGIEPMWEDEKNKRGGRWLITLNKQQRRSDLDRFWLETLLCLIGESFDDYSDDVCGAVVNVRAKGDKIAIWTTECENREAVTHIGRVYKERLGLPPKIVIGYQSHADTATKSGSTTKNRFVV\n";
print FAM_SEQS ">ENSCAFT00000010403.2\n";
print FAM_SEQS "LPRSLPGATAAECASNLKKIYTVQTVQIFWSVYNNIPPVTSLPLRCSYHLMRGERRPLWEEESNAKGGVWKMKVPKDSTSTVWKELLLATIGEQFTDCAAADDEVIGVSVSVRDREDVVQVWNVNASLVGEATVLEKIYELLPHISFKAVFYKPHEEHHAFEGGRGKH\n";
print FAM_SEQS ">ENSCAFT00000016372.2\n";
print FAM_SEQS "QAPFFPETTPTPNPPPTEEEKTESNQEVANPEHYIKHPLQNSWALWFFKNDKSKTWQANLRLISKFDTVEDFWALYNHIQLSSNLMPGCDYSLFKDGIEPMWEDEKNKRGGRWLITLNKQQRRSDLDRFWLETLLCLIGESFDDYSDDVCGAVVNVRAKGDKIAIWTTECENREAVTHIGRVYKERLGLPPKIVIGYQSHADTATKSGSTTKNRFVV\n";
print FAM_SEQS ">ENSCAFT00000026360.2\n";
print FAM_SEQS "PGALLSQRGKAQDGGPPGVKLELHPLLNRWALWFFKNDRSRTWQDNLRLVTKFDTVEDFWAMYSHIQLASKLSSGCDYALFKDGIEPMWEDSRNKRGGRWLVSLAKQQRHSELDRLWLETLLCLIGESFEEHSREVCGAVINIRTKGDKIAVWTREAENQEGVLHIGRVYKERLGLSTKIVIGYQAHADTATKSNSLAKNKFVV\n";
print FAM_SEQS ">ENSCINT00000000571.2\n";
print FAM_SEQS "MAKALFAGGVDVEHIFGNKFNKASRDRSSSPVPMVNGESPKLSRKAISNLGDTEKTGVPLNSAWTLWLDRSVPNLTASEYEANLRKIYTVSTIESFWGVYNHIPPPSRLIPRYSYHLMRNNIRPVWEDEVNANGGMWKLRCHKSVTDNVWNELLLSCIGEQFTGYVNKGDDIIGLSVSIRKNDDLVQVWNINSSNIEQCKVLEKIKEVLPHVIFETSFYKPHQLHRAFEGRKM
\n";
print FAM_SEQS ">ENSCINT00000008672.2\n";
print FAM_SEQS "MSESDKSVKVSLDPGARPKSKESQEEKEVKTVSLKEDVIEEKPMGDPEDCIKHPLQNKWALWFFKNDRQKKWEDNLRLVTKFDTVEDFWALYNHIQLSSKLQSGCDYNLFKDGIQPMWEDKANKKGGKWMLQMSKQQRVNELDKVWLEILLCLIGEGFGEDSDYVNGGVVQVRHKGDKVAIWTSDYKHREGIMNIGQICKTRLGLPKKAVLGFQAHEDTMSKSGSTVKTLWSV
\n";
print FAM_SEQS ">ENSDART00000010517.5\n";
print FAM_SEQS "MATAEPEIKSNSCKSEEEISDESNQEIVSPESYIKHPLQNRWCLWFFKNDKSKTWQANLRLISKFDTVEDFWALYNHIQLSSNLMSGCDYSLFKDGIEPMWEDERNKRGGRWLITLNKQQRKYDLDRFWLETLLCLIGEAFDDYSDDVCGAVVNVRTKGDKIAIWTADYENREAVTHIGRVYKERLGVPMNMTIGYQSHADTATKSGSTTKNKFVV\n";
print FAM_SEQS ">ENSDART00000013768.7\n";
print FAM_SEQS "MAVPAAPNLQLNTARQSSPVNSTENDIHIDERELENITNHVEDGTSLPLHSPWTFWLDRSLPGTTAAECESNLKKIYTVHTVQSFWSVYNNIPPVSCLPLRCSYHLMRGERRPLWEEESNAKGGVWKMKVPKESTLAVWKELLLATIGEQFTDYCASEDEVVGVSVSVREREDVVQVWNGNASFANEANVLGRIYELLPQISFKAVFYKPHEEHHAFEGGRSRH\n";
print FAM_SEQS ">ENSDART00000017881.6\n";
print FAM_SEQS "MASCAVQLIDKVPKKKVEKKKFEPNILKEPCMKHPLQNRWGLWFYKNDKSKMWQDNLRLITKFDTVEDFWGLYNNIQLPSKLSSGCDYSMFKDGIEPMWEDRSNKCGGRWLITLAKQHRHTELDHFWLETV\n";
print FAM_SEQS ">ENSDART00000036718.5\n";
print FAM_SEQS "MATSEPVRGIGLGSFRASQLPEMRGTETEEVRSDSPTAVVTTSPEQYIKHPLQNRWALWYFKNDKSKSWTENLRLISKFDTVEDFWALYNHIQQPSKLGFGCDYCLFKDGIKPMWEDDRNKLGGRWLMTLSKQQRHNDLDRYWMETLLCLIGESFDEASEDVCGAVVNVRPKGDKIAIWTGNCQNRDAIMTIGQQYKERLSLPSKTLIGYQSHDDTSSKSGSTTKNMYSV\n"
;
print FAM_SEQS ">ENSDART00000110579.1\n";
print FAM_SEQS "MATAEPEASTNPSNSEEKNEENEQEIVSLEDYIKHPLQNRWALWFFKNDKSKTWQANLRLISKFDTVEDFWALYNHIQLSSNLMSGCDYSLFKDGIEPMWEDERNKRGGRWLITLSKQQRRADLDRFWLETLLCLVGEAFDDHSDDVCGAVVNIRTKGDKIAIWTTDYENKDAIVHIGRVYKERLGVPPKVIIGYQSHADTATKSGSTTKNKFVV\n";
print FAM_SEQS ">ENSDART00000113697.1\n";
print FAM_SEQS "MATAEPEASTNPSNSEEKNEENEQEIVSLEDYIKHPLQNRWALWFFKNDKSKTWQANLRLISKFDTVEDFWALYNHIQLSSNLMSGCDYSLFKDGIEPMWEDERNKRGGRWLITLSKQQRRADLDRFWLETLLCLVGEAFDDHSDDVCGAVVNIRTKGDKIAIWTTDYENKDAIVHIGRVYKERLGVPPKVIIGYQSHADTATKSGSTTKNKFVV\n";
print FAM_SEQS ">ENSGACT00000007358.1\n";
print FAM_SEQS "MATAEPETNPSPPQPDEDAAKETGQEIVNPEAYIKHPLQNRWSLWFFKNDKSKTWQANLRLISKFDTVEDFWALYNHIQLSSNLLSGCDYSLFKDGIEPMWEDERNKRGGRWLITLNKQQRRQDLDRFWLETLLCLVGEAFGDCSDQVCGAVVNIRTKGDKIAVWTSDYESRDAVTHIGSVYKQRLGLPLKMTIGYQSHADTSTKSGSTTKNRFVV\n";
print FAM_SEQS ">ENSGACT00000010388.1\n";
print FAM_SEQS "MATSEPKAPEPEEPQAPDSQVVANPEQYIKHPLQNRWALWYFKNDKSKSWTENLRLISKFDTVEDFWALYNHIQQPSKLGFGCDYSLFKDGIKPMWEDDRNKLGGRWLMTLNKQQRHNDLDRYWMETLLCLVGESFDEASEDVCGAVVNVRPKGDKISIWTSQCQNRDAIMTIGQNYKERLNIPTKAIIGYQSHDDTSSKSGSTTKNMYSV\n";
print FAM_SEQS ">ENSGACT00000015686.1\n";
print FAM_SEQS "AAAMSVPAGRTVTPERGIDIDEEELENIARSQRGGEAAQLPLHSPWTFWLDRSLPGTTAAQCESGLKKIYTVQSVQLFWSVYNNIPAATALPLRCSYHLMRGERRPLWEEESNAKGGVWKMKIPKESTSAVWKELLLATIGEQFADYCSSDDEVVGVSVSVRDREDVVQIWNSDASLAGEANILGKVYELLPHMSFKAVFYKSHMEHRAFEGGRSRH\n";
print FAM_SEQS ">ENSGACT00000021787.1\n";
print FAM_SEQS "LVFASQLSTSLPANPEKETCETIIQKIMSPESCIKHPLQNKWALWFFKNDKSKTWQANLRLISKFDTVEDFWALYNHIQLSSNLMSGCDYSLFKDGIEPMWEDARNRRGGRWLITLSKQQRRADLDRFWLETLLCLVGEAFDDHSDDVCGAVINVRAKGDKIAVWTTEYENKEAITHIGRVYKERLGVPQKVIIGYQSHADTATKSGSTTKNKFVA\n";