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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: E = None
        self.w: C = None
        self.o: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: E = None
        self.w: C = None
        self.o: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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