class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.x: E = None
        self.v: B = None
        self.o: G = None
        self.u: A = None
        self.s: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: A = None
        self.t: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: G = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: A = None
        self.t: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: G = None
        self.o: E = None
        self.txt = txt

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

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

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