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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: H = None
        self.v: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: G = None
        self.y: D = None
        self.r: H = None
        self.q: E = None
        self.t: C = None
        self.s: F = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: H = None
        self.v: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: G = None
        self.y: D = None
        self.r: H = None
        self.q: E = None
        self.t: C = None
        self.s: F = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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