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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: F = None
        self.s: H = None
        self.x: D = None
        self.y: E = None
        self.q: E = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: E = None
        self.u: F = None
        self.r: F = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: F = None
        self.s: H = None
        self.x: D = None
        self.y: E = None
        self.q: E = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: E = None
        self.u: F = None
        self.r: F = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

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