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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

f = A("f")
a = B("a")
h = C("h")
g = D("g")
c = E("c")
n = F("n")
m = D("m")
j = D("j")
l = C("l")
e = D("e")

f.s = n
f.y = a
a.u = f
a.s = f
h.z = l
h.u = c
h.p = a
h.v = a
h.o = g
g.z = e
c.s = n
n.s = a
n.o = c
m.z = j
j.z = e
l.z = h
l.u = c
l.p = a
l.v = a
l.o = j
e.z = m
assert n.o.s.s.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

f = A("f")
a = B("a")
h = C("h")
g = D("g")
c = E("c")
n = F("n")
m = D("m")
j = D("j")
l = C("l")
e = D("e")

f.s = n
f.y = a
a.u = f
a.s = f
h.z = l
h.u = c
h.p = a
h.v = a
h.o = g
g.z = e
c.s = n
n.s = a
n.o = c
m.z = j
j.z = e
l.z = h
l.u = c
l.p = a
l.v = a
l.o = j
e.z = m
assert n.o.s.s.u.y.txt == "a"