class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: E = None
        self.x: G = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: F = None
        self.q: B = None
        self.t: F = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: B = None
        self.x: G = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: D = None
        self.o: D = None
        self.v: C = None
        self.r: A = None
        self.txt = txt

d = A("d")
j = B("j")
f = C("f")
c = D("c")
n = E("n")
e = F("e")
a = G("a")

d.v = n
d.t = n
d.x = a
d.u = f
j.v = e
f.v = e
f.z = e
f.t = e
f.q = j
f.y = j
c.o = a
c.q = e
n.v = d
n.t = d
n.s = j
n.x = a
n.q = a
e.q = d
e.x = d
e.u = c
e.p = n
e.o = n
e.s = j
e.y = j
a.z = d
a.r = d
a.q = c
a.o = c
a.v = f
assert n.s.v.s.v.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: E = None
        self.x: G = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: F = None
        self.q: B = None
        self.t: F = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: B = None
        self.x: G = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: D = None
        self.o: D = None
        self.v: C = None
        self.r: A = None
        self.txt = txt

d = A("d")
j = B("j")
f = C("f")
c = D("c")
n = E("n")
e = F("e")
a = G("a")

d.v = n
d.t = n
d.x = a
d.u = f
j.v = e
f.v = e
f.z = e
f.t = e
f.q = j
f.y = j
c.o = a
c.q = e
n.v = d
n.t = d
n.s = j
n.x = a
n.q = a
e.q = d
e.x = d
e.u = c
e.p = n
e.o = n
e.s = j
e.y = j
a.z = d
a.r = d
a.q = c
a.o = c
a.v = f
assert n.s.v.s.v.u.q.txt == "e"