class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.p: G = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: D = None
        self.v: C = None
        self.y: H = None
        self.s: D = None
        self.r: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: G = None
        self.q: B = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: A = None
        self.q: E = None
        self.o: F = None
        self.r: F = None
        self.t: G = None
        self.s: B = None
        self.txt = txt

k = A("k")
n = B("n")
i = C("i")
c = D("c")
m = E("m")
j = F("j")
h = G("h")
e = H("e")
a = C("a")
g = E("g")

k.t = c
k.q = n
k.p = h
k.y = a
n.q = j
n.z = j
n.x = c
n.o = c
n.v = k
n.s = g
n.u = m
n.w = i
i.z = e
i.y = e
i.p = c
i.s = c
i.v = a
i.r = a
c.w = n
c.q = n
c.x = h
c.p = h
m.w = e
j.x = n
h.p = j
e.y = j
e.o = j
e.r = j
e.x = k
e.q = g
e.t = h
e.s = n
a.z = e
a.y = e
a.p = c
a.s = c
a.v = i
a.r = i
g.w = e
assert g.w.y.x.q.x.q.x.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.p: G = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: D = None
        self.v: C = None
        self.y: H = None
        self.s: D = None
        self.r: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: G = None
        self.q: B = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: A = None
        self.q: E = None
        self.o: F = None
        self.r: F = None
        self.t: G = None
        self.s: B = None
        self.txt = txt

k = A("k")
n = B("n")
i = C("i")
c = D("c")
m = E("m")
j = F("j")
h = G("h")
e = H("e")
a = C("a")
g = E("g")

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