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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: C = None
        self.r: F = None
        self.x: F = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.q: B = None
        self.s: G = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: D = None
        self.w: D = None
        self.r: C = None
        self.z: G = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: D = None
        self.txt = txt

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

k = A("k")
a = B("a")
g = C("g")
d = D("d")
j = E("j")
m = F("m")
n = G("n")
c = C("c")

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: C = None
        self.r: F = None
        self.x: F = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.q: B = None
        self.s: G = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: D = None
        self.w: D = None
        self.r: C = None
        self.z: G = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: D = None
        self.txt = txt

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

k = A("k")
a = B("a")
g = C("g")
d = D("d")
j = E("j")
m = F("m")
n = G("n")
c = C("c")

k.v = n
k.q = n
k.u = d
k.s = d
k.p = j
k.w = m
k.z = a
a.y = d
a.s = d
a.t = c
a.r = m
a.x = m
g.r = a
g.p = a
g.q = a
g.x = a
g.s = n
g.y = d
d.t = n
d.z = n
d.w = n
d.x = k
d.v = a
d.r = a
j.y = m
j.p = d
j.w = d
j.r = g
j.z = n
j.o = n
m.w = a
m.y = d
n.t = d
n.z = d
c.r = a
c.p = a
c.q = a
c.x = a
c.s = n
c.y = d
assert k.q.z.t.z.x.z.txt == "a"