class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: E = None
        self.s: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.u: E = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

n = A("n")
j = B("j")
l = C("l")
i = D("i")
e = E("e")
b = F("b")
a = B("a")

n.o = e
j.x = n
j.t = a
j.r = e
j.u = b
l.p = b
l.s = b
l.t = e
i.x = j
i.z = j
i.o = e
i.q = n
e.x = n
e.z = b
e.r = l
b.r = l
b.p = j
b.u = e
b.z = e
b.s = i
a.x = n
a.t = j
a.r = e
a.u = b
assert e.x.o.r.s.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: E = None
        self.s: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.u: E = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

n = A("n")
j = B("j")
l = C("l")
i = D("i")
e = E("e")
b = F("b")
a = B("a")

n.o = e
j.x = n
j.t = a
j.r = e
j.u = b
l.p = b
l.s = b
l.t = e
i.x = j
i.z = j
i.o = e
i.q = n
e.x = n
e.z = b
e.r = l
b.r = l
b.p = j
b.u = e
b.z = e
b.s = i
a.x = n
a.t = j
a.r = e
a.u = b
assert e.x.o.r.s.s.q.txt == "n"