#!/usr/bin/perl 

eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
    if 0; # not running under some shell

use strict;
use List::Vectorize;

my $sets = [];
for (@ARGV) {
	open F, $_ or die "cannot open $_";
	push(@$sets, [ <F> ]);
	close F;
}
print join "", @{intersect(@$sets)};
