class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.p: G = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: F = None
        self.x: D = None
        self.y: F = None
        self.o: A = None
        self.u: E = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.p: G = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: F = None
        self.x: D = None
        self.y: F = None
        self.o: A = None
        self.u: E = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: B = None
        self.txt = txt

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

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