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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: E = None
        self.p: H = None
        self.z: B = None
        self.x: B = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: A = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: I = None
        self.r: F = None
        self.v: D = None
        self.q: F = None
        self.x: A = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: E = None
        self.p: H = None
        self.z: B = None
        self.x: B = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: A = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: I = None
        self.r: F = None
        self.v: D = None
        self.q: F = None
        self.x: A = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: G = None
        self.txt = txt

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

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