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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: C = None
        self.t: G = None
        self.y: B = None
        self.p: G = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: C = None
        self.t: G = None
        self.y: B = None
        self.p: G = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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