#!/usr/bin/ruby -w

require 'pp'

norm = IO::readlines(ARGV[0]).map { |l| l.chomp.split(' ', 4) }
diff = IO::readlines(ARGV[1]).map { |l| l.chomp.split(' ', 4) }
oks_norm = norm.select { |l| l[2] == 'OK' }.map { |e| e[0] }
failed_diff = diff.select { |l| l[2] == 'Failed' }
interesting = failed_diff.select { |l| oks_norm.include?(l[0]) }
puts interesting.map { |e| e[0] + "_" + e[1] }
