class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: F = None
        self.x: B = None
        self.q: G = None
        self.z: B = None
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.u: E = None
        self.o: E = None
        self.t: B = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: A = None
        self.x: D = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.t: B = None
        self.y: F = None
        self.u: G = None
        self.txt = txt

f = A("f")
i = B("i")
h = C("h")
n = D("n")
j = E("j")
g = F("g")
a = G("a")
m = H("m")
e = F("e")

f.s = m
f.o = e
f.x = i
f.z = i
f.q = a
f.t = h
i.y = m
i.u = a
i.p = h
i.x = n
h.p = j
h.o = j
h.u = j
h.s = i
h.r = i
h.y = n
h.z = n
n.y = j
n.s = j
n.u = j
n.o = j
n.t = i
n.v = h
j.s = i
j.y = h
j.z = m
g.o = e
a.o = n
a.x = n
a.v = f
a.u = f
m.r = n
m.w = n
m.t = i
m.y = g
m.u = a
e.o = g
assert g.o.o.o.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: F = None
        self.x: B = None
        self.q: G = None
        self.z: B = None
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.u: E = None
        self.o: E = None
        self.t: B = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: A = None
        self.x: D = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.t: B = None
        self.y: F = None
        self.u: G = None
        self.txt = txt

f = A("f")
i = B("i")
h = C("h")
n = D("n")
j = E("j")
g = F("g")
a = G("a")
m = H("m")
e = F("e")

f.s = m
f.o = e
f.x = i
f.z = i
f.q = a
f.t = h
i.y = m
i.u = a
i.p = h
i.x = n
h.p = j
h.o = j
h.u = j
h.s = i
h.r = i
h.y = n
h.z = n
n.y = j
n.s = j
n.u = j
n.o = j
n.t = i
n.v = h
j.s = i
j.y = h
j.z = m
g.o = e
a.o = n
a.x = n
a.v = f
a.u = f
m.r = n
m.w = n
m.t = i
m.y = g
m.u = a
e.o = g
assert g.o.o.o.o.o.txt == "e"