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

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

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

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: B = None
        self.z: B = None
        self.x: F = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: F = None
        self.r: B = None
        self.v: A = None
        self.q: A = None
        self.s: C = None
        self.txt = txt

b = A("b")
l = B("l")
j = C("j")
c = D("c")
n = E("n")
e = F("e")
m = F("m")
i = E("i")
a = C("a")
h = D("h")

b.u = l
l.x = b
l.z = a
j.p = h
j.t = i
j.r = i
j.z = l
j.x = c
c.r = h
c.q = l
c.z = l
c.x = m
c.u = a
n.y = e
n.u = l
e.t = l
e.r = l
e.y = m
e.v = b
e.q = b
e.s = j
m.t = l
m.r = l
m.y = e
m.v = b
m.q = b
m.s = j
i.y = m
i.u = l
a.p = h
a.x = h
a.t = i
a.z = l
a.r = n
h.r = c
h.q = l
h.z = l
h.x = e
h.u = a
assert c.u.p.r.x.r.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: B = None
        self.z: B = None
        self.x: F = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: F = None
        self.r: B = None
        self.v: A = None
        self.q: A = None
        self.s: C = None
        self.txt = txt

b = A("b")
l = B("l")
j = C("j")
c = D("c")
n = E("n")
e = F("e")
m = F("m")
i = E("i")
a = C("a")
h = D("h")

b.u = l
l.x = b
l.z = a
j.p = h
j.t = i
j.r = i
j.z = l
j.x = c
c.r = h
c.q = l
c.z = l
c.x = m
c.u = a
n.y = e
n.u = l
e.t = l
e.r = l
e.y = m
e.v = b
e.q = b
e.s = j
m.t = l
m.r = l
m.y = e
m.v = b
m.q = b
m.s = j
i.y = m
i.u = l
a.p = h
a.x = h
a.t = i
a.z = l
a.r = n
h.r = c
h.q = l
h.z = l
h.x = e
h.u = a
assert c.u.p.r.x.r.z.t.txt == "i"