class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: D = None
        self.y: E = None
        self.t: F = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: G = None
        self.x: G = None
        self.z: G = None
        self.r: I = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: H = None
        self.p: C = None
        self.t: E = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: C = None
        self.r: F = None
        self.y: G = None
        self.u: G = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: A = None
        self.txt = txt

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

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

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

b = A("b")
l = B("l")
a = C("a")
d = D("d")
m = E("m")
i = F("i")
k = G("k")
n = H("n")
f = I("f")
h = J("h")

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: G = None
        self.x: G = None
        self.z: G = None
        self.r: I = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: H = None
        self.p: C = None
        self.t: E = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: C = None
        self.r: F = None
        self.y: G = None
        self.u: G = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: A = None
        self.txt = txt

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

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

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

b = A("b")
l = B("l")
a = C("a")
d = D("d")
m = E("m")
i = F("i")
k = G("k")
n = H("n")
f = I("f")
h = J("h")

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