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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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