class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: C = None
        self.y: J = None
        self.u: C = None
        self.r: J = None
        self.t: D = None
        self.o: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: H = None
        self.y: H = None
        self.z: E = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: H = None
        self.y: H = None
        self.z: E = None
        self.p: F = None
        self.txt = txt

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

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

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