<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> class Solution ( object ) : <EOL> def solve ( self , cipher ) : <EOL> """<STR_LIT>""" <EOL> length , lst = cipher <EOL> return reduce ( lambda x , y : x | y , lst ) * <NUM_LIT:2> ** ( length - <NUM_LIT:1> ) % ( <NUM_LIT:10> ** <NUM_LIT:9> + <NUM_LIT:7> ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> import sys <EOL> f = open ( "<STR_LIT>" , "<STR_LIT:r>" ) <EOL> testcases = int ( f . readline ( ) . strip ( ) ) <EOL> for t in xrange ( testcases ) : <EOL> length = int ( f . readline ( ) . strip ( ) ) <EOL> lst = map ( lambda x : int ( x ) , f . readline ( ) . strip ( ) . split ( "<STR_LIT:U+0020>" ) ) <EOL> cipher = [ length , lst ] <EOL> s = "<STR_LIT>" % ( Solution ( ) . solve ( cipher ) ) <EOL> print s , </s>
