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

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

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

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

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

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

n.t = c
n.x = k
n.u = k
n.q = j
k.z = n
k.o = f
e.w = n
e.o = b
e.u = c
e.t = k
c.o = k
c.z = g
g.z = b
g.u = b
g.x = h
g.o = c
j.t = c
j.x = k
j.u = k
j.q = n
l.w = j
l.o = b
l.u = c
l.t = k
b.z = g
b.u = g
b.x = f
b.o = c
f.w = j
f.o = g
f.u = c
f.t = k
h.w = j
h.o = b
h.u = c
h.t = k
assert k.z.u.o.u.z.x.t.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: B = None
        self.q: A = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

n.t = c
n.x = k
n.u = k
n.q = j
k.z = n
k.o = f
e.w = n
e.o = b
e.u = c
e.t = k
c.o = k
c.z = g
g.z = b
g.u = b
g.x = h
g.o = c
j.t = c
j.x = k
j.u = k
j.q = n
l.w = j
l.o = b
l.u = c
l.t = k
b.z = g
b.u = g
b.x = f
b.o = c
f.w = j
f.o = g
f.u = c
f.t = k
h.w = j
h.o = b
h.u = c
h.t = k
assert k.z.u.o.u.z.x.t.o.t.txt == "k"