class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: I = None
        self.o: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: G = None
        self.u: F = None
        self.x: J = None
        self.p: F = None
        self.y: H = None
        self.o: H = None
        self.w: I = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: A = None
        self.z: E = None
        self.q: D = None
        self.r: H = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: G = None
        self.u: F = None
        self.x: J = None
        self.p: F = None
        self.y: H = None
        self.o: H = None
        self.w: I = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: A = None
        self.z: E = None
        self.q: D = None
        self.r: H = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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