class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: G = None
        self.r: G = None
        self.p: H = None
        self.y: D = None
        self.u: I = None
        self.s: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: G = None
        self.z: F = None
        self.v: H = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: G = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: B = None
        self.w: A = None
        self.y: E = None
        self.p: B = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: D = None
        self.u: I = None
        self.z: A = None
        self.w: D = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: J = None
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: H = None
        self.y: E = None
        self.u: C = None
        self.s: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: G = None
        self.z: F = None
        self.v: H = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: G = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: B = None
        self.w: A = None
        self.y: E = None
        self.p: B = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: D = None
        self.u: I = None
        self.z: A = None
        self.w: D = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: J = None
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: H = None
        self.y: E = None
        self.u: C = None
        self.s: I = None
        self.txt = txt

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

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