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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: G = None
        self.y: D = None
        self.s: B = None
        self.u: G = None
        self.x: D = None
        self.z: A = None
        self.r: I = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: I = None
        self.p: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.t: A = None
        self.q: A = None
        self.o: J = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: A = None
        self.v: B = None
        self.w: F = None
        self.u: B = None
        self.q: G = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: F = None
        self.t: G = None
        self.o: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: G = None
        self.y: D = None
        self.s: B = None
        self.u: G = None
        self.x: D = None
        self.z: A = None
        self.r: I = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: I = None
        self.p: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.t: A = None
        self.q: A = None
        self.o: J = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: A = None
        self.v: B = None
        self.w: F = None
        self.u: B = None
        self.q: G = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: F = None
        self.t: G = None
        self.o: D = None
        self.txt = txt

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

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

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