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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: F = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: B = None
        self.p: C = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

b = A("b")
n = B("n")
k = C("k")
h = D("h")
e = E("e")
g = F("g")
i = D("i")
a = B("a")

b.z = a
n.z = b
n.v = k
n.x = a
n.y = i
k.v = g
k.s = e
h.x = e
h.z = a
h.q = a
h.y = a
h.p = k
h.w = k
e.s = g
e.r = g
e.t = n
g.v = k
g.p = k
g.r = k
g.y = n
g.z = n
i.x = e
i.z = n
i.q = n
i.y = n
i.p = k
i.w = k
a.z = b
a.v = k
a.x = n
a.y = h
assert n.x.x.x.v.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: F = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: B = None
        self.p: C = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

b = A("b")
n = B("n")
k = C("k")
h = D("h")
e = E("e")
g = F("g")
i = D("i")
a = B("a")

b.z = a
n.z = b
n.v = k
n.x = a
n.y = i
k.v = g
k.s = e
h.x = e
h.z = a
h.q = a
h.y = a
h.p = k
h.w = k
e.s = g
e.r = g
e.t = n
g.v = k
g.p = k
g.r = k
g.y = n
g.z = n
i.x = e
i.z = n
i.q = n
i.y = n
i.p = k
i.w = k
a.z = b
a.v = k
a.x = n
a.y = h
assert n.x.x.x.v.s.t.txt == "n"