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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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