class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.z: A = None
        self.q: G = None
        self.u: E = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: C = None
        self.t: E = None
        self.v: C = None
        self.s: C = None
        self.p: C = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: F = None
        self.u: B = None
        self.v: F = None
        self.t: D = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

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

l.z = m
m.v = b
m.x = d
m.p = d
m.s = d
m.u = d
m.q = j
m.y = l
f.o = j
f.u = j
f.v = m
f.z = l
f.q = b
f.y = b
f.r = d
a.q = j
a.t = j
a.x = f
a.s = f
a.v = e
a.p = e
a.z = d
j.y = e
j.o = e
j.w = d
j.v = d
j.u = m
j.t = a
d.v = a
b.o = j
b.y = n
b.t = f
b.q = m
e.o = j
e.u = j
e.v = m
e.z = n
e.q = b
e.y = b
e.r = d
n.z = m
assert f.z.z.y.z.s.v.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.z: A = None
        self.q: G = None
        self.u: E = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: C = None
        self.t: E = None
        self.v: C = None
        self.s: C = None
        self.p: C = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: F = None
        self.u: B = None
        self.v: F = None
        self.t: D = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

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

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