class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: E = None
        self.y: E = None
        self.o: D = None
        self.w: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.y: E = None
        self.p: E = None
        self.v: E = None
        self.txt = txt

b = A("b")
l = B("l")
n = C("n")
k = D("k")
m = E("m")
e = E("e")
c = C("c")
a = C("a")
f = B("f")
h = E("h")

b.o = k
l.r = b
l.x = f
n.t = b
n.s = e
n.y = e
n.o = k
n.w = c
k.r = n
k.t = c
m.w = b
m.z = n
m.y = e
m.p = h
m.v = h
e.w = b
e.z = n
e.y = m
e.p = m
e.v = h
c.t = b
c.s = m
c.y = h
c.o = k
c.w = a
a.t = b
a.s = h
a.y = e
a.o = k
a.w = n
f.r = b
f.x = l
h.w = b
h.z = c
h.y = m
h.p = m
h.v = m
assert a.y.w.o.r.t.o.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: E = None
        self.y: E = None
        self.o: D = None
        self.w: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.y: E = None
        self.p: E = None
        self.v: E = None
        self.txt = txt

b = A("b")
l = B("l")
n = C("n")
k = D("k")
m = E("m")
e = E("e")
c = C("c")
a = C("a")
f = B("f")
h = E("h")

b.o = k
l.r = b
l.x = f
n.t = b
n.s = e
n.y = e
n.o = k
n.w = c
k.r = n
k.t = c
m.w = b
m.z = n
m.y = e
m.p = h
m.v = h
e.w = b
e.z = n
e.y = m
e.p = m
e.v = h
c.t = b
c.s = m
c.y = h
c.o = k
c.w = a
a.t = b
a.s = h
a.y = e
a.o = k
a.w = n
f.r = b
f.x = l
h.w = b
h.z = c
h.y = m
h.p = m
h.v = m
assert a.y.w.o.r.t.o.r.o.txt == "k"