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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: C = None
        self.q: G = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: C = None
        self.q: G = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

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