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

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

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

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

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

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

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

k = A("k")
i = B("i")
g = C("g")
d = D("d")
c = E("c")
f = F("f")
h = G("h")
n = G("n")
j = B("j")

k.x = c
k.v = d
k.r = n
k.q = n
k.z = j
i.q = d
i.v = j
i.t = f
i.r = f
g.y = j
g.s = k
g.z = d
d.z = g
c.z = g
c.q = k
c.s = f
c.u = f
c.r = h
c.p = d
f.r = c
f.p = d
f.v = g
f.t = g
h.u = g
h.t = n
h.s = c
n.u = g
n.t = h
n.s = c
j.q = d
j.v = i
j.t = f
j.r = f
assert c.q.q.u.y.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: D = None
        self.r: G = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

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

k = A("k")
i = B("i")
g = C("g")
d = D("d")
c = E("c")
f = F("f")
h = G("h")
n = G("n")
j = B("j")

k.x = c
k.v = d
k.r = n
k.q = n
k.z = j
i.q = d
i.v = j
i.t = f
i.r = f
g.y = j
g.s = k
g.z = d
d.z = g
c.z = g
c.q = k
c.s = f
c.u = f
c.r = h
c.p = d
f.r = c
f.p = d
f.v = g
f.t = g
h.u = g
h.t = n
h.s = c
n.u = g
n.t = h
n.s = c
j.q = d
j.v = i
j.t = f
j.r = f
assert c.q.q.u.y.q.z.txt == "g"