class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.p: I = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: I = None
        self.q: E = None
        self.r: J = None
        self.x: A = None
        self.s: J = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: J = None
        self.w: A = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: B = None
        self.q: D = None
        self.p: B = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: D = None
        self.w: E = None
        self.s: C = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.p: I = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: I = None
        self.q: E = None
        self.r: J = None
        self.x: A = None
        self.s: J = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: J = None
        self.w: A = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: B = None
        self.q: D = None
        self.p: B = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: D = None
        self.w: E = None
        self.s: C = None
        self.t: F = None
        self.txt = txt

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

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