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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: D = None
        self.u: B = None
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: E = None
        self.txt = txt

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

l.y = d
l.w = a
i.o = d
i.u = d
i.w = d
i.s = a
i.t = k
b.y = k
b.s = e
b.o = a
a.o = k
a.v = k
e.x = k
e.s = k
e.t = l
e.v = l
k.x = e
k.u = f
f.x = k
f.s = k
f.t = l
f.v = l
d.o = i
d.u = i
d.w = i
d.s = a
d.t = k
assert e.v.y.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: D = None
        self.u: B = None
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: E = None
        self.txt = txt

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

l.y = d
l.w = a
i.o = d
i.u = d
i.w = d
i.s = a
i.t = k
b.y = k
b.s = e
b.o = a
a.o = k
a.v = k
e.x = k
e.s = k
e.t = l
e.v = l
k.x = e
k.u = f
f.x = k
f.s = k
f.t = l
f.v = l
d.o = i
d.u = i
d.w = i
d.s = a
d.t = k
assert e.v.y.s.v.txt == "k"