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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: A = None
        self.z: G = None
        self.t: H = None
        self.s: E = None
        self.v: H = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: H = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: B = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: A = None
        self.z: G = None
        self.t: H = None
        self.s: E = None
        self.v: H = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: H = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: B = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: A = None
        self.txt = txt

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

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