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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: B = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: B = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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