def decode(w : str, tl=(0, 0), sz=100):
    """
    Decode word → x-y coordinates, square size
    """
    if w == "":
        return tl, sz

    sz = sz // 2

    if w[0] == "b":
        tl = (tl[0]+sz, tl[1])
    elif w[0] == "c":
        tl = (tl[0], tl[1]+sz)
    elif w[0] == "d":
        tl = (tl[0]+sz, tl[1]+sz)

    return decode(w[1:], tl, sz)