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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: B = None
        self.z: C = None
        self.r: E = None
        self.y: E = None
        self.q: B = None
        self.u: F = None
        self.txt = txt

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

g = A("g")
d = B("d")
k = C("k")
j = D("j")
b = E("b")
m = F("m")
h = G("h")
n = H("n")
e = A("e")

g.o = j
g.x = j
g.z = k
d.w = e
k.y = h
k.z = h
k.w = g
k.o = d
j.r = d
j.u = n
b.q = e
b.r = j
b.u = h
b.w = d
b.t = k
b.y = k
b.x = m
m.u = k
h.x = d
h.w = d
h.q = d
h.z = k
h.r = b
h.y = b
h.u = m
n.v = d
n.o = b
n.x = h
e.o = j
e.x = j
e.z = k
assert e.o.u.x.z.o.w.x.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: C = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: B = None
        self.z: C = None
        self.r: E = None
        self.y: E = None
        self.q: B = None
        self.u: F = None
        self.txt = txt

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

g = A("g")
d = B("d")
k = C("k")
j = D("j")
b = E("b")
m = F("m")
h = G("h")
n = H("n")
e = A("e")

g.o = j
g.x = j
g.z = k
d.w = e
k.y = h
k.z = h
k.w = g
k.o = d
j.r = d
j.u = n
b.q = e
b.r = j
b.u = h
b.w = d
b.t = k
b.y = k
b.x = m
m.u = k
h.x = d
h.w = d
h.q = d
h.z = k
h.r = b
h.y = b
h.u = m
n.v = d
n.o = b
n.x = h
e.o = j
e.x = j
e.z = k
assert e.o.u.x.z.o.w.x.r.w.txt == "e"