class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: B = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.r: C = None
        self.x: B = None
        self.w: H = None
        self.q: E = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

l = A("l")
i = B("i")
m = C("m")
d = D("d")
e = E("e")
f = F("f")
b = G("b")
c = H("c")
j = E("j")
a = G("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: B = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.r: C = None
        self.x: B = None
        self.w: H = None
        self.q: E = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

l = A("l")
i = B("i")
m = C("m")
d = D("d")
e = E("e")
f = F("f")
b = G("b")
c = H("c")
j = E("j")
a = G("a")

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