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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: G = None
        self.y: E = None
        self.o: F = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: F = None
        self.w: G = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: A = None
        self.u: H = None
        self.o: G = None
        self.t: A = None
        self.p: G = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: E = None
        self.q: I = None
        self.s: B = None
        self.z: A = None
        self.o: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: E = None
        self.p: E = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: G = None
        self.y: E = None
        self.o: F = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: F = None
        self.w: G = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: A = None
        self.u: H = None
        self.o: G = None
        self.t: A = None
        self.p: G = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: E = None
        self.q: I = None
        self.s: B = None
        self.z: A = None
        self.o: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: E = None
        self.p: E = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: A = None
        self.txt = txt

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

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