'''
stdin , stdout , ÒÔ¼° stderr ±äÁ¿°üº¬Óë±ê×¼ I/O Á÷¶ÔÓ¦µÄÁ÷¶ÔÏó.
Èç¹ûÐèÒª¸üºÃµØ¿ØÖÆÊä³ö,¶ø print ²»ÄÜÂú×ãÄãµÄÒªÇó, ËüÃÇ¾ÍÊÇÄãËùÐèÒªµÄ.
ÄãÒ²¿ÉÒÔ Ìæ»» ËüÃÇ, ÕâÊ±ºòÄã¾Í¿ÉÒÔÖØ¶¨ÏòÊä³öºÍÊäÈëµ½ÆäËüÉè±¸( device ), »òÕßÒÔ·Ç±ê×¼µÄ·½Ê½´¦ÀíËüÃÇ.
'''

import sys
import string

class Redirect:
    def __init__(self, stdout):
        self.stdout = stdout

    def write(self, s):
        self.stdout.write(string.lower(s))

# redirect standard output (including the print statement)
# ÖØ¶¨Ïò±ê×¼Êä³ö(°üÀ¨ print Óï¾ä)
old_stdout = sys.stdout
sys.stdout = Redirect(sys.stdout)

print "HEJA SVERIGE",
print "FRISKT HUM\303\226R"

# restore standard output
# »Ö¸´±ê×¼Êä³ö
sys.stdout = old_stdout
print "M\303\205\303\205\303\205\303\205L!"


'''
ÒªÖØ¶¨ÏòÊä³öÖ»Òª´´½¨Ò»¸ö¶ÔÏó, ²¢ÊµÏÖËüµÄ write ·½·¨.
(³ý·Ç C ÀàÐÍµÄÊµÀýÍâ£º Python Ê¹ÓÃÒ»¸ö½Ð×ö softspace µÄÕûÊýÊôÐÔÀ´¿ØÖÆÊä³öÖÐµÄ¿Õ°×.
Èç¹ûÃ»ÓÐÕâ¸öÊôÐÔ, Python ½«°ÑÕâ¸öÊôÐÔ¸½¼Óµ½Õâ¸ö¶ÔÏóÉÏ.
Äã²»ÐèÒªÔÚÊ¹ÓÃ Python ¶ÔÏóÊ±µ£ÐÄ, µ«ÊÇÔÚÖØ¶¨Ïòµ½Ò»¸ö C ÀàÐÍÊ±, ÄãÓ¦¸ÃÈ·±£¸ÃÀàÐÍÖ§³Ö softspace ÊôÐÔ.)
'''