class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: C = None
        self.v: G = None
        self.p: D = None
        self.z: H = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: A = None
        self.t: E = None
        self.q: H = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.s: G = None
        self.r: D = None
        self.t: I = None
        self.q: F = None
        self.o: F = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: A = None
        self.t: E = None
        self.q: H = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.s: G = None
        self.r: D = None
        self.t: I = None
        self.q: F = None
        self.o: F = None
        self.p: C = None
        self.txt = txt

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

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