class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: H = None
        self.p: I = None
        self.s: F = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: H = None
        self.u: D = None
        self.q: A = None
        self.t: B = None
        self.p: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: H = None
        self.p: I = None
        self.s: F = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: H = None
        self.u: D = None
        self.q: A = None
        self.t: B = None
        self.p: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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