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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: F = None
        self.u: F = None
        self.t: F = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: C = None
        self.r: H = None
        self.y: A = None
        self.o: F = None
        self.v: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: A = None
        self.t: A = None
        self.p: B = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: E = None
        self.p: D = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: A = None
        self.t: H = None
        self.s: C = None
        self.u: I = None
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: F = None
        self.u: F = None
        self.t: F = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: C = None
        self.r: H = None
        self.y: A = None
        self.o: F = None
        self.v: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: A = None
        self.t: A = None
        self.p: B = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: E = None
        self.p: D = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: A = None
        self.t: H = None
        self.s: C = None
        self.u: I = None
        self.r: H = None
        self.txt = txt

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

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