class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.o: B = None
        self.r: E = None
        self.y: C = None
        self.txt = txt

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

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

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

g = A("g")
i = B("i")
a = C("a")
k = D("k")
e = E("e")
m = B("m")
d = D("d")
j = C("j")

g.t = e
i.u = d
i.z = a
i.o = m
i.r = e
i.y = j
a.s = d
a.w = g
k.x = g
k.w = i
k.o = d
e.y = k
e.t = g
e.v = g
e.w = j
e.q = d
m.u = k
m.z = j
m.y = j
m.o = i
m.r = e
d.x = g
d.w = i
d.o = k
j.s = d
j.w = g
assert k.o.o.o.x.t.y.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.o: B = None
        self.r: E = None
        self.y: C = None
        self.txt = txt

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

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

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

g = A("g")
i = B("i")
a = C("a")
k = D("k")
e = E("e")
m = B("m")
d = D("d")
j = C("j")

g.t = e
i.u = d
i.z = a
i.o = m
i.r = e
i.y = j
a.s = d
a.w = g
k.x = g
k.w = i
k.o = d
e.y = k
e.t = g
e.v = g
e.w = j
e.q = d
m.u = k
m.z = j
m.y = j
m.o = i
m.r = e
d.x = g
d.w = i
d.o = k
j.s = d
j.w = g
assert k.o.o.o.x.t.y.w.txt == "i"