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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: E = None
        self.s: C = None
        self.y: C = None
        self.p: E = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: I = None
        self.t: I = None
        self.u: D = None
        self.r: G = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: B = None
        self.q: C = None
        self.o: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: A = None
        self.z: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: E = None
        self.s: C = None
        self.y: C = None
        self.p: E = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: I = None
        self.t: I = None
        self.u: D = None
        self.r: G = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: B = None
        self.q: C = None
        self.o: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: A = None
        self.z: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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