class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: B = None
        self.s: C = None
        self.v: A = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: F = None
        self.o: F = None
        self.s: F = None
        self.z: F = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: F = None
        self.o: F = None
        self.s: F = None
        self.z: F = None
        self.u: F = None
        self.txt = txt

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

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

j.o = i
j.s = i
j.z = n
j.v = c
n.y = h
n.p = i
i.p = m
i.x = m
i.z = c
h.x = g
h.t = g
h.z = j
m.v = c
m.r = g
m.u = g
m.o = d
m.s = d
m.z = d
d.v = h
d.u = n
g.v = h
g.u = n
c.o = i
c.s = i
c.z = n
c.v = f
f.o = i
f.s = i
f.z = n
f.v = j
assert f.z.p.x.v.s.p.txt == "m"