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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: G = None
        self.u: E = None
        self.s: D = None
        self.r: B = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: B = None
        self.s: D = None
        self.r: B = None
        self.v: G = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: D = None
        self.y: D = None
        self.t: E = None
        self.txt = txt

d = A("d")
h = B("h")
b = C("b")
a = D("a")
e = E("e")
c = F("c")
i = G("i")
m = H("m")
f = A("f")

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: G = None
        self.u: E = None
        self.s: D = None
        self.r: B = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: B = None
        self.s: D = None
        self.r: B = None
        self.v: G = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: D = None
        self.y: D = None
        self.t: E = None
        self.txt = txt

d = A("d")
h = B("h")
b = C("b")
a = D("a")
e = E("e")
c = F("c")
i = G("i")
m = H("m")
f = A("f")

d.y = e
d.z = b
d.q = h
d.o = c
d.p = m
h.x = i
h.w = c
h.o = c
h.r = a
h.s = a
h.u = e
h.z = f
h.q = b
b.y = a
b.s = a
b.q = a
b.o = i
b.u = e
b.r = h
a.x = c
a.y = e
a.z = e
a.r = i
a.v = b
a.o = f
e.t = f
e.y = h
e.r = h
e.s = a
e.v = i
e.w = i
e.u = d
c.r = i
c.x = i
c.z = e
c.t = f
c.u = h
i.p = e
i.x = a
i.r = m
m.u = f
m.p = a
m.y = a
m.t = e
f.y = e
f.z = b
f.q = h
f.o = c
f.p = m
assert a.v.u.u.q.z.z.u.t.y.txt == "e"