class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: D = None
        self.t: G = 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.q: D = None
        self.y: B = None
        self.v: E = None
        self.x: D = None
        self.t: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: H = None
        self.v: E = None
        self.z: B = None
        self.u: A = None
        self.x: D = None
        self.p: A = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: F = None
        self.w: G = None
        self.t: E = None
        self.txt = txt

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

h.y = b
h.z = a
h.t = j
i.w = h
e.q = c
e.x = c
e.y = i
e.t = i
e.v = n
c.z = a
c.w = j
c.q = h
n.t = i
n.v = i
n.s = e
n.w = b
n.z = h
b.r = n
b.v = n
b.q = d
b.z = i
b.o = i
b.u = h
b.p = h
b.x = a
j.r = n
j.v = a
j.z = a
j.y = c
j.p = d
j.u = h
d.s = b
d.p = b
d.w = j
d.t = n
a.z = c
a.w = j
a.q = h
assert e.x.w.r.w.o.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: D = None
        self.t: G = 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.q: D = None
        self.y: B = None
        self.v: E = None
        self.x: D = None
        self.t: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: H = None
        self.v: E = None
        self.z: B = None
        self.u: A = None
        self.x: D = None
        self.p: A = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: F = None
        self.w: G = None
        self.t: E = None
        self.txt = txt

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

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