class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: A = None
        self.x: F = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: A = None
        self.x: F = None
        self.v: D = None
        self.txt = txt

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

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