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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: F = None
        self.q: E = None
        self.r: F = None
        self.txt = txt

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

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

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

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

i.w = l
i.z = l
i.o = n
i.q = n
i.x = n
i.s = k
n.y = k
n.x = k
n.q = i
k.v = m
k.x = e
k.r = e
k.q = l
m.p = k
m.w = l
m.q = l
l.w = m
l.y = n
l.z = i
e.y = n
assert l.w.p.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: B = None
        self.z: E = None
        self.q: B = None
        self.s: C = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: F = None
        self.q: E = None
        self.r: F = None
        self.txt = txt

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

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

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

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

i.w = l
i.z = l
i.o = n
i.q = n
i.x = n
i.s = k
n.y = k
n.x = k
n.q = i
k.v = m
k.x = e
k.r = e
k.q = l
m.p = k
m.w = l
m.q = l
l.w = m
l.y = n
l.z = i
e.y = n
assert l.w.p.q.txt == "l"