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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: I = None
        self.r: H = None
        self.t: J = None
        self.x: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: J = None
        self.y: G = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.r: C = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: F = None
        self.x: B = None
        self.u: D = None
        self.z: A = None
        self.r: D = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: I = None
        self.r: H = None
        self.t: J = None
        self.x: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: J = None
        self.y: G = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.r: C = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: F = None
        self.x: B = None
        self.u: D = None
        self.z: A = None
        self.r: D = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: J = None
        self.txt = txt

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

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

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