class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: H = None
        self.v: E = None
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: A = None
        self.w: G = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: B = None
        self.z: J = None
        self.t: E = None
        self.x: E = None
        self.q: I = None
        self.w: B = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: J = None
        self.p: G = None
        self.u: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: F = None
        self.w: C = None
        self.z: H = None
        self.x: E = None
        self.txt = txt

b = A("b")
f = B("f")
n = C("n")
g = D("g")
l = E("l")
e = F("e")
d = G("d")
a = H("a")
c = I("c")
k = J("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: A = None
        self.w: G = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: B = None
        self.z: J = None
        self.t: E = None
        self.x: E = None
        self.q: I = None
        self.w: B = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: J = None
        self.p: G = None
        self.u: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: F = None
        self.w: C = None
        self.z: H = None
        self.x: E = None
        self.txt = txt

b = A("b")
f = B("f")
n = C("n")
g = D("g")
l = E("l")
e = F("e")
d = G("d")
a = H("a")
c = I("c")
k = J("k")

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