class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: A = None
        self.z: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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