class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: F = None
        self.q: F = None
        self.o: I = None
        self.t: G = None
        self.y: D = None
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: F = None
        self.v: C = None
        self.t: I = None
        self.z: F = None
        self.s: B = None
        self.p: I = None
        self.o: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: J = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: F = None
        self.q: F = None
        self.o: I = None
        self.t: G = None
        self.y: D = None
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: F = None
        self.v: C = None
        self.t: I = None
        self.z: F = None
        self.s: B = None
        self.p: I = None
        self.o: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: J = None
        self.txt = txt

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

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

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

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