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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: J = None
        self.y: D = None
        self.p: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: J = None
        self.y: D = None
        self.p: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: B = None
        self.txt = txt

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

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

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