class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: B = None
        self.w: G = None
        self.q: H = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: D = None
        self.p: J = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: H = None
        self.x: J = None
        self.p: E = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: G = None
        self.o: H = None
        self.r: B = None
        self.u: C = None
        self.x: G = None
        self.w: H = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: J = None
        self.u: C = None
        self.v: A = None
        self.q: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: I = None
        self.s: G = None
        self.u: A = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: D = None
        self.p: J = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: H = None
        self.x: J = None
        self.p: E = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: G = None
        self.o: H = None
        self.r: B = None
        self.u: C = None
        self.x: G = None
        self.w: H = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: J = None
        self.u: C = None
        self.v: A = None
        self.q: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: I = None
        self.s: G = None
        self.u: A = None
        self.q: B = None
        self.txt = txt

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

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