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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: C = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

l.o = d
l.y = n
l.u = h
l.s = f
l.x = a
k.s = b
k.v = i
k.t = l
i.y = l
d.z = l
d.y = l
d.o = i
d.p = e
d.x = n
e.y = k
e.z = i
e.w = i
e.o = i
b.q = l
b.t = h
b.u = h
b.w = h
b.o = e
b.v = d
n.s = a
n.v = i
n.t = l
a.q = l
a.t = b
a.u = b
a.w = h
a.o = e
a.v = f
h.q = l
h.t = a
h.w = a
h.u = b
h.o = e
h.v = f
f.z = l
f.y = l
f.o = i
f.p = e
f.x = k
assert n.s.q.x.v.y.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: B = None
        self.u: F = None
        self.s: D = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: C = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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