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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: C = None
        self.z: E = None
        self.p: C = None
        self.txt = txt

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

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

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

a.o = n
a.x = l
a.w = b
l.p = b
l.w = b
l.v = k
m.o = k
d.x = j
d.o = m
d.p = m
d.z = n
n.x = a
n.y = k
n.w = m
n.o = m
n.u = j
j.u = m
j.w = l
e.x = j
e.o = m
e.p = m
e.z = n
b.u = m
b.w = l
k.x = b
k.o = m
k.p = m
k.z = n
assert n.x.w.u.o.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: B = None
        self.w: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: C = None
        self.z: E = None
        self.p: C = None
        self.txt = txt

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

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

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

a.o = n
a.x = l
a.w = b
l.p = b
l.w = b
l.v = k
m.o = k
d.x = j
d.o = m
d.p = m
d.z = n
n.x = a
n.y = k
n.w = m
n.o = m
n.u = j
j.u = m
j.w = l
e.x = j
e.o = m
e.p = m
e.z = n
b.u = m
b.w = l
k.x = b
k.o = m
k.p = m
k.z = n
assert n.x.w.u.o.z.x.txt == "a"