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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.u: D = None
        self.q: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: D = None
        self.t: A = None
        self.r: A = None
        self.z: F = None
        self.y: D = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.u: D = None
        self.q: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: D = None
        self.t: A = None
        self.r: A = None
        self.z: F = None
        self.y: D = None
        self.v: E = None
        self.txt = txt

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

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