class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: E = None
        self.w: D = None
        self.r: D = None
        self.y: C = None
        self.z: B = None
        self.q: G = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.x: C = None
        self.u: F = None
        self.v: D = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: H = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: A = None
        self.r: C = None
        self.v: C = None
        self.z: D = None
        self.q: B = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: E = None
        self.u: G = None
        self.x: E = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.x: C = None
        self.u: F = None
        self.v: D = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: H = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: A = None
        self.r: C = None
        self.v: C = None
        self.z: D = None
        self.q: B = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: E = None
        self.u: G = None
        self.x: E = None
        self.v: F = None
        self.txt = txt

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

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