class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: J = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.o: B = None
        self.w: A = None
        self.u: I = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: C = None
        self.s: J = None
        self.x: A = None
        self.y: B = None
        self.u: A = None
        self.z: H = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: D = None
        self.s: E = None
        self.t: E = None
        self.y: D = None
        self.x: G = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: C = None
        self.o: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.z: E = None
        self.r: C = None
        self.s: G = None
        self.t: F = None
        self.v: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.o: B = None
        self.w: A = None
        self.u: I = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: C = None
        self.s: J = None
        self.x: A = None
        self.y: B = None
        self.u: A = None
        self.z: H = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: D = None
        self.s: E = None
        self.t: E = None
        self.y: D = None
        self.x: G = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: C = None
        self.o: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.z: E = None
        self.r: C = None
        self.s: G = None
        self.t: F = None
        self.v: A = None
        self.txt = txt

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

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