class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: D = None
        self.q: E = None
        self.v: G = None
        self.w: G = None
        self.u: H = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: C = None
        self.v: H = None
        self.u: F = None
        self.w: F = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: H = None
        self.p: G = None
        self.x: B = None
        self.v: H = None
        self.s: D = None
        self.u: F = None
        self.q: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: H = None
        self.p: E = None
        self.y: F = None
        self.s: H = None
        self.u: B = None
        self.o: D = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: A = None
        self.r: H = None
        self.s: A = None
        self.z: B = None
        self.p: B = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: A = None
        self.s: D = None
        self.u: B = None
        self.x: C = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: C = None
        self.v: H = None
        self.u: F = None
        self.w: F = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: H = None
        self.p: G = None
        self.x: B = None
        self.v: H = None
        self.s: D = None
        self.u: F = None
        self.q: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: H = None
        self.p: E = None
        self.y: F = None
        self.s: H = None
        self.u: B = None
        self.o: D = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: A = None
        self.r: H = None
        self.s: A = None
        self.z: B = None
        self.p: B = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: A = None
        self.s: D = None
        self.u: B = None
        self.x: C = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

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

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