class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: D = None
        self.p: E = None
        self.u: F = None
        self.t: J = 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.z: A = None
        self.x: J = None
        self.t: I = None
        self.o: H = None
        self.u: A = None
        self.q: I = None
        self.v: G = None
        self.s: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: B = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: H = None
        self.o: E = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: J = None
        self.txt = txt

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

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

j.w = i
j.v = m
j.p = g
j.u = d
j.t = e
k.w = c
i.z = j
i.u = j
i.x = e
i.s = e
i.t = c
i.q = c
i.o = h
i.v = n
m.u = n
m.p = n
m.y = k
g.y = h
g.r = i
d.p = m
d.t = i
d.r = h
d.y = c
n.y = d
n.v = h
n.o = g
n.q = i
h.y = i
h.u = d
h.v = d
h.o = d
h.q = d
h.x = d
h.p = j
h.z = k
h.r = c
c.q = k
c.y = e
e.r = n
e.v = d
e.s = d
e.p = c
e.u = m
e.x = k
assert d.t.u.v.u.v.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: D = None
        self.p: E = None
        self.u: F = None
        self.t: J = 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.z: A = None
        self.x: J = None
        self.t: I = None
        self.o: H = None
        self.u: A = None
        self.q: I = None
        self.v: G = None
        self.s: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: B = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: H = None
        self.o: E = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: J = None
        self.txt = txt

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

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

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