<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> class Solution ( object ) : <EOL> def solve ( self , cipher ) : <EOL> """<STR_LIT>""" <EOL> m , A , n , B = cipher <EOL> result = set ( ) <EOL> hm = { } <EOL> for a in A : <EOL> if a not in hm : <EOL> hm [ a ] = <NUM_LIT:1> <EOL> else : <EOL> hm [ a ] += <NUM_LIT:1> <EOL> for b in B : <EOL> if b not in hm or hm [ b ] <= <NUM_LIT:0> : <EOL> result . add ( b ) <EOL> else : <EOL> hm [ b ] -= <NUM_LIT:1> <EOL> result = sorted ( list ( result ) ) <EOL> return "<STR_LIT:U+0020>" . join ( map ( str , result ) ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> import sys <EOL> f = open ( "<STR_LIT>" , "<STR_LIT:r>" ) <EOL> solution = Solution ( ) <EOL> m = int ( f . readline ( ) . strip ( ) ) <EOL> A = map ( int , f . readline ( ) . strip ( ) . split ( '<STR_LIT:U+0020>' ) ) <EOL> n = int ( f . readline ( ) . strip ( ) ) <EOL> B = map ( int , f . readline ( ) . strip ( ) . split ( '<STR_LIT:U+0020>' ) ) <EOL> cipher = m , A , n , B <EOL> s = "<STR_LIT>" % ( solution . solve ( cipher ) ) <EOL> print s , </s>
