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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: A = None
        self.o: F = None
        self.q: A = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

h = A("h")
l = B("l")
i = C("i")
e = D("e")
d = E("d")
j = F("j")
m = A("m")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: A = None
        self.o: F = None
        self.q: A = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

h = A("h")
l = B("l")
i = C("i")
e = D("e")
d = E("d")
j = F("j")
m = A("m")

h.s = l
h.z = j
h.t = m
h.p = e
h.o = d
l.s = i
l.r = e
l.p = j
i.s = m
e.o = j
e.v = h
e.z = l
d.v = e
d.p = h
d.o = j
d.q = m
d.x = m
d.u = i
j.o = e
j.w = l
j.p = h
m.s = l
m.z = j
m.t = h
m.p = e
m.o = d
assert i.s.p.z.s.s.z.w.txt == "l"