class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.o: B = None
        self.q: G = None
        self.s: B = None
        self.r: F = None
        self.x: C = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: G = None
        self.p: F = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: E = None
        self.s: C = None
        self.o: B = None
        self.x: G = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: E = None
        self.x: A = None
        self.w: E = None
        self.z: C = None
        self.t: E = None
        self.p: C = None
        self.r: H = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: B = None
        self.r: B = None
        self.s: G = None
        self.y: H = None
        self.w: C = None
        self.t: G = None
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: G = None
        self.p: F = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: E = None
        self.s: C = None
        self.o: B = None
        self.x: G = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: E = None
        self.x: A = None
        self.w: E = None
        self.z: C = None
        self.t: E = None
        self.p: C = None
        self.r: H = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: B = None
        self.r: B = None
        self.s: G = None
        self.y: H = None
        self.w: C = None
        self.t: G = None
        self.x: D = None
        self.txt = txt

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

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