class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: F = None
        self.p: A = None
        self.u: D = None
        self.y: E = None
        self.s: A = None
        self.w: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: H = None
        self.w: F = None
        self.x: H = None
        self.s: B = None
        self.v: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: A = None
        self.t: H = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: H = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: F = None
        self.p: A = None
        self.u: D = None
        self.y: E = None
        self.s: A = None
        self.w: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: H = None
        self.w: F = None
        self.x: H = None
        self.s: B = None
        self.v: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: A = None
        self.t: H = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: H = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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