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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: A = None
        self.p: G = None
        self.z: G = None
        self.o: E = None
        self.u: E = None
        self.r: E = None
        self.q: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: E = None
        self.x: D = None
        self.y: H = None
        self.p: J = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: D = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.o: F = None
        self.r: D = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: A = None
        self.p: G = None
        self.z: G = None
        self.o: E = None
        self.u: E = None
        self.r: E = None
        self.q: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: E = None
        self.x: D = None
        self.y: H = None
        self.p: J = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: D = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.o: F = None
        self.r: D = None
        self.t: D = None
        self.txt = txt

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

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