class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: C = None
        self.o: G = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: F = None
        self.u: A = None
        self.o: G = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: B = None
        self.p: G = None
        self.w: D = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: C = None
        self.o: G = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: F = None
        self.u: A = None
        self.o: G = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: B = None
        self.p: G = None
        self.w: D = None
        self.s: F = None
        self.txt = txt

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

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

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

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