class A:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: E = None
        self.o: F = None
        self.r: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: C = None
        self.y: B = None
        self.r: B = None
        self.u: H = None
        self.z: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: G = None
        self.q: B = None
        self.txt = txt

c = A("c")
g = B("g")
j = C("j")
e = D("e")
m = E("m")
b = F("b")
l = G("l")
h = H("h")
n = I("n")
k = J("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: E = None
        self.o: F = None
        self.r: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: C = None
        self.y: B = None
        self.r: B = None
        self.u: H = None
        self.z: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: G = None
        self.q: B = None
        self.txt = txt

c = A("c")
g = B("g")
j = C("j")
e = D("e")
m = E("m")
b = F("b")
l = G("l")
h = H("h")
n = I("n")
k = J("k")

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