class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.p: I = None
        self.u: I = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: E = None
        self.t: D = None
        self.y: D = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: A = None
        self.w: B = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: D = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: E = None
        self.y: B = None
        self.t: B = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: F = None
        self.y: I = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: E = None
        self.t: D = None
        self.y: D = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: A = None
        self.w: B = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: D = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: E = None
        self.y: B = None
        self.t: B = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: F = None
        self.y: I = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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