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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: B = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: J = None
        self.t: E = None
        self.u: I = None
        self.x: J = None
        self.q: J = None
        self.p: I = None
        self.y: I = None
        self.r: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: J = None
        self.u: D = None
        self.q: A = None
        self.r: J = None
        self.t: E = None
        self.w: D = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: G = None
        self.p: C = None
        self.txt = txt

i = A("i")
m = B("m")
j = C("j")
f = D("f")
h = E("h")
b = F("b")
n = G("n")
g = H("g")
a = I("a")
c = J("c")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: B = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: J = None
        self.t: E = None
        self.u: I = None
        self.x: J = None
        self.q: J = None
        self.p: I = None
        self.y: I = None
        self.r: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: J = None
        self.u: D = None
        self.q: A = None
        self.r: J = None
        self.t: E = None
        self.w: D = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: G = None
        self.p: C = None
        self.txt = txt

i = A("i")
m = B("m")
j = C("j")
f = D("f")
h = E("h")
b = F("b")
n = G("n")
g = H("g")
a = I("a")
c = J("c")

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