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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: J = None
        self.u: C = None
        self.q: I = None
        self.z: I = None
        self.v: C = None
        self.r: D = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: E = None
        self.y: A = None
        self.o: C = None
        self.s: B = None
        self.x: I = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: A = None
        self.v: E = None
        self.y: F = None
        self.t: G = None
        self.x: E = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: J = None
        self.u: C = None
        self.q: I = None
        self.z: I = None
        self.v: C = None
        self.r: D = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: E = None
        self.y: A = None
        self.o: C = None
        self.s: B = None
        self.x: I = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: A = None
        self.v: E = None
        self.y: F = None
        self.t: G = None
        self.x: E = None
        self.z: D = None
        self.txt = txt

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

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

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

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