class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.y: D = None
        self.q: F = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: C = None
        self.u: A = None
        self.v: E = None
        self.txt = txt

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

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

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

f.o = n
f.u = n
f.w = j
f.y = e
f.q = i
n.q = f
n.v = l
n.o = e
n.r = j
j.q = n
j.w = n
l.x = a
l.v = a
l.w = j
l.u = f
a.z = i
a.o = f
i.r = j
i.w = a
e.x = a
e.v = a
e.w = j
e.u = f
assert l.u.q.w.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.y: D = None
        self.q: F = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: C = None
        self.u: A = None
        self.v: E = None
        self.txt = txt

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

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

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

f.o = n
f.u = n
f.w = j
f.y = e
f.q = i
n.q = f
n.v = l
n.o = e
n.r = j
j.q = n
j.w = n
l.x = a
l.v = a
l.w = j
l.u = f
a.z = i
a.o = f
i.r = j
i.w = a
e.x = a
e.v = a
e.w = j
e.u = f
assert l.u.q.w.txt == "a"