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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: F = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: I = None
        self.p: G = None
        self.o: B = None
        self.x: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: F = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: I = None
        self.p: G = None
        self.o: B = None
        self.x: C = None
        self.txt = txt

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

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

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