class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: F = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: D = None
        self.z: A = None
        self.x: C = None
        self.t: B = None
        self.p: C = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: B = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: D = None
        self.z: A = None
        self.x: C = None
        self.t: B = None
        self.p: C = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: B = None
        self.z: A = None
        self.txt = txt

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

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

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

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