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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: F = None
        self.s: E = None
        self.t: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: A = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: D = None
        self.z: J = None
        self.v: G = None
        self.u: D = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: C = None
        self.s: F = None
        self.v: C = None
        self.x: C = None
        self.t: E = None
        self.y: I = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: B = None
        self.u: E = None
        self.s: G = None
        self.y: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: F = None
        self.s: E = None
        self.t: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: A = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: D = None
        self.z: J = None
        self.v: G = None
        self.u: D = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: C = None
        self.s: F = None
        self.v: C = None
        self.x: C = None
        self.t: E = None
        self.y: I = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: B = None
        self.u: E = None
        self.s: G = None
        self.y: B = None
        self.txt = txt

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

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