class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.s: G = None
        self.o: H = None
        self.p: G = None
        self.r: B = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: E = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: B = None
        self.y: G = None
        self.x: H = None
        self.q: H = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.r: H = None
        self.o: F = None
        self.z: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: E = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: B = None
        self.y: G = None
        self.x: H = None
        self.q: H = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.r: H = None
        self.o: F = None
        self.z: C = None
        self.txt = txt

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

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

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