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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: B = None
        self.u: F = None
        self.x: D = None
        self.w: H = None
        self.s: H = None
        self.y: F = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: B = None
        self.u: F = None
        self.x: D = None
        self.w: H = None
        self.s: H = None
        self.y: F = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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