class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: I = None
        self.s: J = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: G = None
        self.p: A = None
        self.v: F = None
        self.r: A = None
        self.w: C = None
        self.o: A = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: C = None
        self.u: B = None
        self.z: A = None
        self.o: A = None
        self.v: D = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: E = None
        self.y: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: G = None
        self.p: A = None
        self.v: F = None
        self.r: A = None
        self.w: C = None
        self.o: A = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: C = None
        self.u: B = None
        self.z: A = None
        self.o: A = None
        self.v: D = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: E = None
        self.y: I = None
        self.txt = txt

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

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