def readline(string):
    """
    read a line from string
    """
    x = ""
    i = 0
    while i < len(string):
        if string[i] != "\n":
            x += string[i]
            i += 1
        else:
            return x + "\n"
    return x