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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: F = None
        self.v: A = None
        self.w: F = None
        self.s: G = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: F = None
        self.v: A = None
        self.w: F = None
        self.s: G = None
        self.t: E = None
        self.txt = txt

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

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

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

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