class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: E = None
        self.o: G = None
        self.r: E = None
        self.w: J = None
        self.q: D = None
        self.x: H = None
        self.v: J = None
        self.u: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: J = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: F = None
        self.r: A = None
        self.y: J = None
        self.q: C = None
        self.v: D = None
        self.s: D = None
        self.w: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: C = None
        self.y: J = None
        self.x: H = None
        self.p: E = None
        self.o: E = None
        self.z: J = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: J = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: F = None
        self.r: A = None
        self.y: J = None
        self.q: C = None
        self.v: D = None
        self.s: D = None
        self.w: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: C = None
        self.y: J = None
        self.x: H = None
        self.p: E = None
        self.o: E = None
        self.z: J = None
        self.t: H = None
        self.txt = txt

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

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

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