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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: A = None
        self.v: A = None
        self.y: G = None
        self.t: A = None
        self.u: F = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: A = None
        self.v: A = None
        self.y: G = None
        self.t: A = None
        self.u: F = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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