class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.t: D = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: F = None
        self.s: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: F = None
        self.s: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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