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

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

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

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

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

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

n = A("n")
j = B("j")
e = C("e")
l = D("l")
f = E("f")
d = F("d")
k = E("k")
g = A("g")

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

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

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

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

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

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

n = A("n")
j = B("j")
e = C("e")
l = D("l")
f = E("f")
d = F("d")
k = E("k")
g = A("g")

n.s = d
n.y = d
n.z = d
n.o = j
n.p = l
j.z = d
j.p = l
j.w = l
j.t = n
j.v = k
j.r = e
e.p = j
e.y = d
e.o = n
e.v = l
e.w = g
l.o = n
l.y = f
l.x = g
l.r = e
f.z = e
f.o = j
f.t = j
f.p = n
d.s = j
d.x = j
d.r = g
d.w = g
d.p = f
k.z = e
k.o = j
k.t = j
k.p = n
g.s = d
g.y = d
g.z = d
g.o = j
g.p = l
assert k.z.y.p.txt == "f"