class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: F = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: B = None
        self.x: H = None
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: H = None
        self.y: F = None
        self.r: J = None
        self.x: B = None
        self.s: J = None
        self.t: E = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: D = None
        self.r: D = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.t: H = None
        self.q: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: B = None
        self.x: H = None
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: H = None
        self.y: F = None
        self.r: J = None
        self.x: B = None
        self.s: J = None
        self.t: E = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: D = None
        self.r: D = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.t: H = None
        self.q: F = None
        self.y: D = None
        self.txt = txt

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

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

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