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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: J = None
        self.v: J = None
        self.r: G = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.o: A = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: I = None
        self.s: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: J = None
        self.v: J = None
        self.r: G = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.o: A = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: I = None
        self.s: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: C = None
        self.txt = txt

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

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