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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: E = None
        self.r: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: B = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: E = None
        self.r: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: B = None
        self.p: A = None
        self.txt = txt

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

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