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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: D = None
        self.s: B = None
        self.p: B = None
        self.y: B = None
        self.u: D = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: E = None
        self.u: H = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: A = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: D = None
        self.s: B = None
        self.p: B = None
        self.y: B = None
        self.u: D = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: E = None
        self.u: H = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: A = None
        self.r: C = None
        self.txt = txt

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

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

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

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