class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

l.r = n
e.x = l
e.y = i
m.o = k
m.w = n
i.q = n
i.t = n
i.x = l
i.v = k
i.y = e
k.y = l
k.v = d
d.w = m
d.t = l
d.u = l
d.y = n
d.s = k
a.q = d
a.t = d
a.x = l
a.v = k
a.y = e
n.w = m
n.t = l
n.u = l
n.y = d
n.s = k
assert n.s.v.t.r.t.r.y.s.txt == "k"