class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: B = None
        self.z: E = None
        self.v: H = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: B = None
        self.r: C = None
        self.x: H = None
        self.t: D = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: B = None
        self.u: B = None
        self.s: H = None
        self.x: A = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: A = None
        self.y: C = None
        self.t: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: B = None
        self.z: B = None
        self.s: G = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

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

i.s = j
i.p = c
i.z = l
i.v = g
i.u = b
m.s = g
m.x = g
m.p = c
m.z = c
m.y = c
m.r = j
m.t = n
j.z = g
j.s = g
j.p = m
j.u = c
j.w = c
j.x = i
j.v = i
n.p = h
n.r = h
n.z = j
n.s = j
n.v = i
l.x = c
l.u = i
l.y = j
l.t = b
b.p = i
k.p = l
g.u = l
g.t = l
g.r = m
g.z = m
g.s = k
g.y = i
h.p = n
h.r = n
h.z = j
h.s = j
h.v = i
c.s = g
c.x = g
c.p = m
c.z = m
c.y = m
c.r = j
c.t = h
assert c.z.z.t.r.r.r.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: B = None
        self.z: E = None
        self.v: H = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: B = None
        self.r: C = None
        self.x: H = None
        self.t: D = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: B = None
        self.u: B = None
        self.s: H = None
        self.x: A = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: A = None
        self.y: C = None
        self.t: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: B = None
        self.z: B = None
        self.s: G = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

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

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