class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: F = None
        self.z: H = None
        self.y: C = None
        self.x: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: C = None
        self.o: F = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: H = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: C = None
        self.o: F = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: H = None
        self.z: F = None
        self.txt = txt

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

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

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