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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: H = None
        self.p: H = None
        self.q: D = None
        self.y: F = None
        self.z: F = None
        self.v: I = None
        self.x: F = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: A = None
        self.z: I = None
        self.r: F = None
        self.s: B = None
        self.y: H = None
        self.p: H = None
        self.u: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: A = None
        self.t: D = None
        self.q: D = None
        self.r: I = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: H = None
        self.p: H = None
        self.q: D = None
        self.y: F = None
        self.z: F = None
        self.v: I = None
        self.x: F = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: A = None
        self.z: I = None
        self.r: F = None
        self.s: B = None
        self.y: H = None
        self.p: H = None
        self.u: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: A = None
        self.t: D = None
        self.q: D = None
        self.r: I = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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