class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: E = None
        self.y: H = None
        self.p: C = None
        self.o: J = None
        self.w: E = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: H = None
        self.x: F = None
        self.u: I = None
        self.s: F = None
        self.w: A = None
        self.y: F = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: B = None
        self.r: J = None
        self.x: D = None
        self.o: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: H = None
        self.x: F = None
        self.u: I = None
        self.s: F = None
        self.w: A = None
        self.y: F = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: B = None
        self.r: J = None
        self.x: D = None
        self.o: I = None
        self.txt = txt

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

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

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

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