class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: G = None
        self.q: I = None
        self.x: G = None
        self.u: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: H = None
        self.w: D = None
        self.v: F = None
        self.t: D = None
        self.s: J = None
        self.y: E = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: I = None
        self.t: G = None
        self.q: C = None
        self.u: D = None
        self.r: G = None
        self.txt = txt

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

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

m = A("m")
c = B("c")
e = C("e")
d = D("d")
h = E("h")
g = F("g")
n = G("n")
a = H("a")
j = I("j")
k = J("k")

m.o = h
m.t = n
m.x = n
m.q = j
m.u = g
m.y = d
c.t = k
c.p = k
c.s = k
c.y = j
e.z = h
e.s = k
e.u = n
e.o = a
e.w = c
d.y = n
d.r = a
h.v = n
h.t = e
g.r = n
g.z = d
n.z = g
n.v = g
n.q = a
n.w = d
n.t = d
n.s = k
n.y = h
n.r = h
a.v = m
a.x = j
a.t = n
a.r = n
a.q = e
a.u = d
j.z = c
k.x = g
k.t = h
k.s = a
assert n.w.y.s.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: G = None
        self.q: I = None
        self.x: G = None
        self.u: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: H = None
        self.w: D = None
        self.v: F = None
        self.t: D = None
        self.s: J = None
        self.y: E = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: I = None
        self.t: G = None
        self.q: C = None
        self.u: D = None
        self.r: G = None
        self.txt = txt

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

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

m = A("m")
c = B("c")
e = C("e")
d = D("d")
h = E("h")
g = F("g")
n = G("n")
a = H("a")
j = I("j")
k = J("k")

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