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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: C = None
        self.p: F = None
        self.o: B = None
        self.w: E = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: A = None
        self.txt = txt

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

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

h.s = f
h.r = f
h.q = i
h.z = i
h.v = l
h.p = n
f.y = d
f.z = d
f.o = n
d.z = l
d.o = h
d.r = h
d.s = a
d.w = f
d.y = e
i.u = a
i.w = a
i.r = d
i.p = n
i.o = f
i.s = f
a.v = h
a.r = h
n.x = d
e.v = h
e.r = h
l.x = d
assert a.v.s.y.s.r.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.q: D = None
        self.z: D = None
        self.v: F = None
        self.p: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: C = None
        self.p: F = None
        self.o: B = None
        self.w: E = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: A = None
        self.txt = txt

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

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

h.s = f
h.r = f
h.q = i
h.z = i
h.v = l
h.p = n
f.y = d
f.z = d
f.o = n
d.z = l
d.o = h
d.r = h
d.s = a
d.w = f
d.y = e
i.u = a
i.w = a
i.r = d
i.p = n
i.o = f
i.s = f
a.v = h
a.r = h
n.x = d
e.v = h
e.r = h
l.x = d
assert a.v.s.y.s.r.r.o.txt == "n"