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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: H = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: D = None
        self.t: G = None
        self.r: G = None
        self.z: C = None
        self.s: G = None
        self.w: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: B = None
        self.o: E = None
        self.v: J = None
        self.r: D = None
        self.u: G = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: D = None
        self.p: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: H = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: D = None
        self.t: G = None
        self.r: G = None
        self.z: C = None
        self.s: G = None
        self.w: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: B = None
        self.o: E = None
        self.v: J = None
        self.r: D = None
        self.u: G = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: D = None
        self.p: D = None
        self.x: F = None
        self.txt = txt

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

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