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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: F = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: A = None
        self.v: C = None
        self.s: B = None
        self.r: B = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

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

d.v = k
d.t = c
d.q = c
d.w = e
d.r = e
d.s = l
d.z = f
e.v = h
e.w = k
e.u = l
l.v = n
c.v = l
f.w = h
f.q = l
f.s = e
f.z = c
k.q = c
k.v = e
k.r = h
k.x = h
k.z = n
h.o = d
h.w = d
h.v = l
h.s = e
h.r = e
h.x = e
h.t = e
n.q = c
n.v = e
n.r = h
n.x = h
n.z = k
assert e.v.v.v.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: D = None
        self.w: B = None
        self.s: C = None
        self.q: D = None
        self.r: B = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: F = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: A = None
        self.v: C = None
        self.s: B = None
        self.r: B = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

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

d.v = k
d.t = c
d.q = c
d.w = e
d.r = e
d.s = l
d.z = f
e.v = h
e.w = k
e.u = l
l.v = n
c.v = l
f.w = h
f.q = l
f.s = e
f.z = c
k.q = c
k.v = e
k.r = h
k.x = h
k.z = n
h.o = d
h.w = d
h.v = l
h.s = e
h.r = e
h.x = e
h.t = e
n.q = c
n.v = e
n.r = h
n.x = h
n.z = k
assert e.v.v.v.q.v.txt == "l"