class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: F = None
        self.w: F = None
        self.y: C = None
        self.t: D = None
        self.p: C = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: F = None
        self.w: F = None
        self.y: C = None
        self.t: D = None
        self.p: C = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

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