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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: B = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

f.y = m
f.u = n
f.o = a
f.x = a
f.p = d
j.y = d
j.v = n
j.u = a
i.x = l
i.z = l
i.p = f
d.o = m
d.s = a
a.v = f
a.t = j
m.w = f
m.s = n
m.u = i
m.z = d
l.x = i
l.z = i
l.p = f
n.y = g
n.v = j
n.u = a
g.o = m
g.s = a
assert n.v.u.t.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: B = None
        self.o: E = None
        self.x: E = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: B = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

f.y = m
f.u = n
f.o = a
f.x = a
f.p = d
j.y = d
j.v = n
j.u = a
i.x = l
i.z = l
i.p = f
d.o = m
d.s = a
a.v = f
a.t = j
m.w = f
m.s = n
m.u = i
m.z = d
l.x = i
l.z = i
l.p = f
n.y = g
n.v = j
n.u = a
g.o = m
g.s = a
assert n.v.u.t.y.s.txt == "a"