class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: G = None
        self.y: C = None
        self.s: C = None
        self.v: D = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: A = None
        self.txt = txt

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

k = A("k")
e = B("e")
n = C("n")
h = D("h")
a = E("a")
d = F("d")
b = G("b")
l = A("l")

k.q = a
k.z = b
k.y = n
k.s = n
k.t = n
k.v = h
e.q = n
e.z = b
n.p = b
n.z = e
n.o = e
n.w = e
h.x = k
h.u = a
h.o = n
a.q = n
a.w = b
d.t = b
d.x = l
b.z = n
b.q = n
b.o = a
b.s = a
b.r = h
b.x = e
l.q = a
l.z = b
l.y = n
l.s = n
l.t = n
l.v = h
assert h.o.p.q.z.q.w.q.w.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: G = None
        self.y: C = None
        self.s: C = None
        self.v: D = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: A = None
        self.txt = txt

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

k = A("k")
e = B("e")
n = C("n")
h = D("h")
a = E("a")
d = F("d")
b = G("b")
l = A("l")

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