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

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

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

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

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

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

g = A("g")
h = B("h")
j = C("j")
a = D("a")
e = E("e")
l = F("l")
i = C("i")
k = E("k")

g.v = l
g.s = a
g.z = a
h.y = g
h.v = g
h.p = i
h.o = j
h.z = l
j.w = g
j.x = a
j.y = a
a.p = g
a.u = l
e.s = j
e.t = k
e.x = h
e.z = h
e.p = i
l.s = i
l.w = g
i.w = g
i.x = a
i.y = a
k.s = j
k.t = e
k.x = h
k.z = h
k.p = i
assert h.z.w.s.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

g = A("g")
h = B("h")
j = C("j")
a = D("a")
e = E("e")
l = F("l")
i = C("i")
k = E("k")

g.v = l
g.s = a
g.z = a
h.y = g
h.v = g
h.p = i
h.o = j
h.z = l
j.w = g
j.x = a
j.y = a
a.p = g
a.u = l
e.s = j
e.t = k
e.x = h
e.z = h
e.p = i
l.s = i
l.w = g
i.w = g
i.x = a
i.y = a
k.s = j
k.t = e
k.x = h
k.z = h
k.p = i
assert h.z.w.s.p.s.txt == "a"