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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: F = None
        self.u: A = None
        self.o: G = None
        self.x: C = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: F = None
        self.u: A = None
        self.o: G = None
        self.x: C = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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