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

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

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

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

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

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

j.o = c
j.y = c
j.t = d
j.x = i
b.z = n
b.s = c
b.y = i
b.u = f
d.x = i
d.p = c
d.y = c
d.r = h
c.u = e
c.q = e
c.t = k
c.w = k
i.o = e
i.v = e
i.z = j
n.z = b
n.s = c
n.y = e
n.u = f
h.x = e
h.p = c
h.y = c
h.r = d
e.o = i
e.v = i
e.z = j
f.z = b
f.u = b
f.s = c
f.y = i
k.o = c
k.y = c
k.t = d
k.x = e
assert f.y.z.t.x.z.x.o.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: D = None
        self.t: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

j.o = c
j.y = c
j.t = d
j.x = i
b.z = n
b.s = c
b.y = i
b.u = f
d.x = i
d.p = c
d.y = c
d.r = h
c.u = e
c.q = e
c.t = k
c.w = k
i.o = e
i.v = e
i.z = j
n.z = b
n.s = c
n.y = e
n.u = f
h.x = e
h.p = c
h.y = c
h.r = d
e.o = i
e.v = i
e.z = j
f.z = b
f.u = b
f.s = c
f.y = i
k.o = c
k.y = c
k.t = d
k.x = e
assert f.y.z.t.x.z.x.o.o.z.txt == "j"