<s> import ck . kernel as ck <EOL> import sys <EOL> import json <EOL> print ( '<STR_LIT>' , sys . stdin . encoding ) <EOL> print ( '<STR_LIT>' , sys . getdefaultencoding ( ) ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( '<STR_LIT>' ) <EOL> f = open ( '<STR_LIT>' , '<STR_LIT:rb>' ) <EOL> b = f . read ( ) <EOL> f . close ( ) <EOL> s = b . decode ( '<STR_LIT:utf-8>' ) <EOL> print ( type ( s ) ) <EOL> s1 = s . encode ( '<STR_LIT:utf-8>' ) <EOL> print ( type ( s1 ) ) <EOL> s2 = s . encode ( sys . stdin . encoding , errors = '<STR_LIT:ignore>' ) <EOL> print ( type ( s2 ) ) <EOL> if sys . version_info [ <NUM_LIT:0> ] > <NUM_LIT:2> : <EOL> sys . stdout . buffer . write ( s2 ) <EOL> sys . stdout . buffer . write ( b'<STR_LIT:\n>' ) <EOL> else : <EOL> print ( s2 ) <EOL> f = open ( '<STR_LIT>' , '<STR_LIT:wb>' ) <EOL> f . write ( b ) <EOL> f . close ( ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( '<STR_LIT>' ) <EOL> if sys . version_info [ <NUM_LIT:0> ] > <NUM_LIT:2> : <EOL> f = open ( '<STR_LIT>' , '<STR_LIT:r>' , encoding = '<STR_LIT:utf-8>' ) <EOL> else : <EOL> f = open ( '<STR_LIT>' , '<STR_LIT:r>' ) <EOL> s = f . read ( ) <EOL> f . close ( ) <EOL> if sys . version_info [ <NUM_LIT:0> ] > <NUM_LIT:2> : <EOL> d = json . loads ( s ) <EOL> else : <EOL> d = json . loads ( s , encoding = '<STR_LIT:utf-8>' ) <EOL> b1 = d [ '<STR_LIT>' ] [ <NUM_LIT:1> ] . encode ( '<STR_LIT:utf-8>' ) <EOL> if sys . version_info [ <NUM_LIT:0> ] > <NUM_LIT:2> : <EOL> sys . stdout . buffer . write ( b1 ) <EOL> sys . stdout . buffer . write ( b'<STR_LIT:\n>' ) <EOL> else : <EOL> print ( b1 ) <EOL> if sys . version_info [ <NUM_LIT:0> ] > <NUM_LIT:2> : <EOL> de = json . dumps ( d , indent = <NUM_LIT:2> , ensure_ascii = False ) <EOL> else : <EOL> de = json . dumps ( d , indent = <NUM_LIT:2> , ensure_ascii = False , encoding = '<STR_LIT:utf-8>' ) <EOL> print ( '<STR_LIT>' ) <EOL> b = de . encode ( '<STR_LIT:utf-8>' ) <EOL> if sys . version_info [ <NUM_LIT:0> ] > <NUM_LIT:2> : <EOL> sys . stdout . buffer . write ( b ) <EOL> else : <EOL> print ( b ) <EOL> if sys . version_info [ <NUM_LIT:0> ] > <NUM_LIT:2> : <EOL> f = open ( '<STR_LIT>' , '<STR_LIT:wb>' ) <EOL> else : <EOL> f = open ( '<STR_LIT>' , '<STR_LIT:w>' ) <EOL> f . write ( de . encode ( '<STR_LIT:utf-8>' ) ) <EOL> f . close ( ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( '<STR_LIT>' ) <EOL> if sys . version_info [ <NUM_LIT:0> ] > <NUM_LIT:2> : <EOL> s = input ( '<STR_LIT>' ) <EOL> else : <EOL> s = raw_input ( '<STR_LIT>' ) . decode ( sys . stdin . encoding ) . encode ( '<STR_LIT:utf-8>' ) <EOL> print ( s ) <EOL> if sys . version_info [ <NUM_LIT:0> ] > <NUM_LIT:2> : <EOL> b1 = s . encode ( '<STR_LIT:utf-8>' ) <EOL> sys . stdout . buffer . write ( b1 ) <EOL> sys . stdout . buffer . write ( b'<STR_LIT:\n>' ) <EOL> else : <EOL> print ( s ) <EOL> if sys . version_info [ <NUM_LIT:0> ] > <NUM_LIT:2> : <EOL> f = open ( '<STR_LIT>' , '<STR_LIT:wb>' ) <EOL> f . write ( s . encode ( '<STR_LIT:utf-8>' ) ) <EOL> else : <EOL> f = open ( '<STR_LIT>' , '<STR_LIT:w>' ) <EOL> f . write ( s ) <EOL> f . close ( ) </s>
