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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: C = None
        self.t: A = None
        self.o: E = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: C = None
        self.t: A = None
        self.o: E = None
        self.x: C = None
        self.txt = txt

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

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

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

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

d.y = b
d.v = m
d.o = m
a.q = i
a.z = i
a.x = i
a.t = d
a.o = h
i.p = h
i.s = e
i.o = d
i.t = c
i.v = c
c.s = a
c.w = m
c.x = b
f.p = m
f.o = e
f.w = c
m.s = a
m.w = c
m.x = e
h.p = c
h.w = c
h.o = e
b.q = i
b.z = i
b.x = i
b.t = d
b.o = h
k.q = i
k.z = i
k.x = i
k.t = d
k.o = f
e.q = i
e.z = i
e.x = i
e.t = d
e.o = f
assert a.t.y.t.y.t.y.t.y.t.txt == "d"