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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: C = None
        self.s: D = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: G = None
        self.x: B = None
        self.p: J = None
        self.v: I = None
        self.r: J = None
        self.z: I = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: G = None
        self.z: F = None
        self.y: B = None
        self.s: D = None
        self.p: B = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: G = None
        self.q: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: C = None
        self.s: D = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: G = None
        self.x: B = None
        self.p: J = None
        self.v: I = None
        self.r: J = None
        self.z: I = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: G = None
        self.z: F = None
        self.y: B = None
        self.s: D = None
        self.p: B = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: G = None
        self.q: F = None
        self.txt = txt

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

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

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