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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: F = None
        self.w: D = None
        self.z: A = None
        self.q: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: G = None
        self.y: B = None
        self.w: D = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: F = None
        self.x: F = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: D = None
        self.t: G = None
        self.y: B = None
        self.q: I = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: C = None
        self.t: G = None
        self.u: F = None
        self.z: D = None
        self.q: F = None
        self.w: C = None
        self.v: G = None
        self.x: C = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: E = None
        self.w: G = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: F = None
        self.w: D = None
        self.z: A = None
        self.q: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: G = None
        self.y: B = None
        self.w: D = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: F = None
        self.x: F = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: D = None
        self.t: G = None
        self.y: B = None
        self.q: I = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: C = None
        self.t: G = None
        self.u: F = None
        self.z: D = None
        self.q: F = None
        self.w: C = None
        self.v: G = None
        self.x: C = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: E = None
        self.w: G = None
        self.u: E = None
        self.txt = txt

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

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