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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

i.v = a
i.u = d
i.o = f
i.z = m
i.y = h
n.s = l
k.w = f
k.o = l
k.x = a
a.v = m
m.v = n
m.y = a
f.q = n
f.r = i
c.s = n
d.q = c
d.r = h
h.v = a
h.u = d
h.o = f
h.z = m
h.y = i
l.s = c
assert k.x.v.v.s.txt == "l"