class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.y: A = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: F = None
        self.u: F = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: A = None
        self.w: E = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: B = None
        self.txt = txt

d = A("d")
l = B("l")
a = C("a")
i = D("i")
n = E("n")
g = F("g")
b = A("b")
c = B("c")
h = B("h")
f = E("f")

d.u = b
d.o = b
d.y = b
d.s = h
l.y = f
l.p = g
l.u = g
l.s = g
a.p = i
a.x = g
i.x = g
i.w = d
n.t = g
n.o = d
n.w = f
n.p = i
g.y = a
g.o = l
b.u = d
b.o = d
b.y = d
b.s = c
c.y = f
c.p = g
c.u = g
c.s = g
h.y = n
h.p = g
h.u = g
h.s = g
f.t = g
f.o = b
f.w = n
f.p = i
assert h.s.o.u.y.p.w.s.y.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.y: A = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: F = None
        self.u: F = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: A = None
        self.w: E = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: B = None
        self.txt = txt

d = A("d")
l = B("l")
a = C("a")
i = D("i")
n = E("n")
g = F("g")
b = A("b")
c = B("c")
h = B("h")
f = E("f")

d.u = b
d.o = b
d.y = b
d.s = h
l.y = f
l.p = g
l.u = g
l.s = g
a.p = i
a.x = g
i.x = g
i.w = d
n.t = g
n.o = d
n.w = f
n.p = i
g.y = a
g.o = l
b.u = d
b.o = d
b.y = d
b.s = c
c.y = f
c.p = g
c.u = g
c.s = g
h.y = n
h.p = g
h.u = g
h.s = g
f.t = g
f.o = b
f.w = n
f.p = i
assert h.s.o.u.y.p.w.s.y.t.o.txt == "l"