class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: E = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: J = None
        self.s: A = None
        self.w: A = None
        self.z: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: E = None
        self.q: B = None
        self.z: G = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: H = None
        self.y: A = None
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: F = None
        self.z: B = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: J = None
        self.s: A = None
        self.w: A = None
        self.z: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: E = None
        self.q: B = None
        self.z: G = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: H = None
        self.y: A = None
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: F = None
        self.z: B = None
        self.v: G = None
        self.txt = txt

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

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