class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: C = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: D = None
        self.z: H = None
        self.w: I = None
        self.y: I = None
        self.s: I = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: B = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: D = None
        self.u: E = None
        self.q: G = None
        self.z: A = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: D = None
        self.z: H = None
        self.w: I = None
        self.y: I = None
        self.s: I = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: B = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: D = None
        self.u: E = None
        self.q: G = None
        self.z: A = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: E = None
        self.txt = txt

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

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

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