class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: F = None
        self.y: A = None
        self.x: D = None
        self.o: A = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: F = None
        self.u: C = None
        self.s: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: H = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: H = None
        self.s: F = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.x: A = None
        self.t: C = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: H = None
        self.u: G = None
        self.p: E = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: F = None
        self.u: C = None
        self.s: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: H = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: H = None
        self.s: F = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.x: A = None
        self.t: C = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: H = None
        self.u: G = None
        self.p: E = None
        self.x: G = None
        self.txt = txt

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

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

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

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