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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: C = None
        self.w: D = None
        self.y: E = None
        self.t: A = None
        self.r: E = None
        self.x: J = None
        self.p: I = None
        self.q: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: I = None
        self.v: C = None
        self.x: G = None
        self.t: A = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: A = None
        self.u: D = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: G = None
        self.s: E = None
        self.v: E = None
        self.o: H = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: I = None
        self.x: F = None
        self.w: H = None
        self.r: E = None
        self.z: J = None
        self.s: J = None
        self.v: F = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: F = None
        self.x: F = None
        self.t: E = None
        self.v: A = None
        self.s: I = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: F = None
        self.txt = txt

h = A("h")
b = B("b")
i = C("i")
k = D("k")
c = E("c")
j = F("j")
f = G("f")
a = H("a")
n = I("n")
m = J("m")

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: C = None
        self.w: D = None
        self.y: E = None
        self.t: A = None
        self.r: E = None
        self.x: J = None
        self.p: I = None
        self.q: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: I = None
        self.v: C = None
        self.x: G = None
        self.t: A = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: A = None
        self.u: D = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: G = None
        self.s: E = None
        self.v: E = None
        self.o: H = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: I = None
        self.x: F = None
        self.w: H = None
        self.r: E = None
        self.z: J = None
        self.s: J = None
        self.v: F = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: F = None
        self.x: F = None
        self.t: E = None
        self.v: A = None
        self.s: I = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: F = None
        self.txt = txt

h = A("h")
b = B("b")
i = C("i")
k = D("k")
c = E("c")
j = F("j")
f = G("f")
a = H("a")
n = I("n")
m = J("m")

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