class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: E = None
        self.v: J = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: E = None
        self.s: B = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: C = None
        self.r: F = None
        self.u: F = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: I = None
        self.z: H = None
        self.x: J = None
        self.r: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: H = None
        self.u: F = None
        self.w: E = None
        self.y: E = None
        self.r: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: E = None
        self.v: J = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: E = None
        self.s: B = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: C = None
        self.r: F = None
        self.u: F = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: I = None
        self.z: H = None
        self.x: J = None
        self.r: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: H = None
        self.u: F = None
        self.w: E = None
        self.y: E = None
        self.r: E = None
        self.txt = txt

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

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