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

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: D = None
        self.r: B = None
        self.w: E = None
        self.p: A = None
        self.txt = txt

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

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

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

g = A("g")
n = B("n")
l = C("l")
c = D("c")
i = E("i")
m = A("m")
j = A("j")
h = B("h")
k = C("k")

g.z = i
g.u = c
g.o = h
n.z = h
n.r = h
n.y = c
n.w = i
n.p = j
l.y = c
l.q = c
l.x = i
l.z = j
c.r = k
c.t = h
i.w = n
i.u = k
i.v = k
i.t = m
m.z = i
m.u = c
m.o = n
j.z = i
j.u = c
j.o = n
h.z = n
h.r = n
h.y = c
h.w = i
h.p = m
k.y = c
k.q = c
k.x = i
k.z = j
assert g.u.r.x.u.z.u.t.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: D = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: D = None
        self.r: B = None
        self.w: E = None
        self.p: A = None
        self.txt = txt

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

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

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

g = A("g")
n = B("n")
l = C("l")
c = D("c")
i = E("i")
m = A("m")
j = A("j")
h = B("h")
k = C("k")

g.z = i
g.u = c
g.o = h
n.z = h
n.r = h
n.y = c
n.w = i
n.p = j
l.y = c
l.q = c
l.x = i
l.z = j
c.r = k
c.t = h
i.w = n
i.u = k
i.v = k
i.t = m
m.z = i
m.u = c
m.o = n
j.z = i
j.u = c
j.o = n
h.z = n
h.r = n
h.y = c
h.w = i
h.p = m
k.y = c
k.q = c
k.x = i
k.z = j
assert g.u.r.x.u.z.u.t.w.t.txt == "m"