#!/usr/bin/perl -w
use strict;

my @txt = ();
while (<>) { chomp; push @txt, $_; }

my $found = -1;
for (my $i=@txt-1; $i>=0; $i--) {
    if ($txt[$i] =~ /references/i) { $found = $i; last; }
    if ($txt[$i] =~ /bibliography/i) { $found = $i; last; }
}
if ($found >= 0) {
    for (my $i=$found; $i<@txt; $i++) {
        print $txt[$i] . "\n";
    }
}


