class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

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