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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: F = None
        self.t: B = None
        self.q: D = None
        self.txt = txt

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

a.o = i
a.w = l
f.w = e
f.t = n
f.o = g
f.u = l
l.o = i
l.w = k
l.v = n
l.u = a
l.z = g
l.t = f
k.p = l
k.z = f
k.x = f
k.w = e
g.p = n
g.z = a
g.v = l
e.x = l
e.o = n
e.t = f
e.q = k
h.o = a
h.w = l
i.o = a
i.w = l
n.x = l
n.o = e
n.t = f
n.q = k
assert h.o.o.w.z.p.o.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: F = None
        self.t: B = None
        self.q: D = None
        self.txt = txt

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

a.o = i
a.w = l
f.w = e
f.t = n
f.o = g
f.u = l
l.o = i
l.w = k
l.v = n
l.u = a
l.z = g
l.t = f
k.p = l
k.z = f
k.x = f
k.w = e
g.p = n
g.z = a
g.v = l
e.x = l
e.o = n
e.t = f
e.q = k
h.o = a
h.w = l
i.o = a
i.w = l
n.x = l
n.o = e
n.t = f
n.q = k
assert h.o.o.w.z.p.o.x.u.txt == "a"