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

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

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

class D:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: B = None
        self.r: F = None
        self.txt = txt

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

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

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

m.p = j
m.o = k
m.v = i
d.z = m
d.t = a
k.s = m
k.v = n
k.q = i
k.y = j
k.z = j
k.t = j
f.p = g
f.t = d
f.r = i
a.v = d
a.z = i
a.t = i
a.x = m
a.p = j
i.z = m
n.z = m
n.t = a
g.p = f
g.t = n
g.r = i
j.s = m
j.v = n
j.q = i
j.y = k
j.z = k
j.t = k
assert f.p.t.z.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: C = None
        self.v: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: B = None
        self.r: F = None
        self.txt = txt

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

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

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

m.p = j
m.o = k
m.v = i
d.z = m
d.t = a
k.s = m
k.v = n
k.q = i
k.y = j
k.z = j
k.t = j
f.p = g
f.t = d
f.r = i
a.v = d
a.z = i
a.t = i
a.x = m
a.p = j
i.z = m
n.z = m
n.t = a
g.p = f
g.t = n
g.r = i
j.s = m
j.v = n
j.q = i
j.y = k
j.z = k
j.t = k
assert f.p.t.z.p.s.txt == "m"