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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: A = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: H = None
        self.x: I = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: D = None
        self.w: E = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: J = None
        self.q: F = None
        self.r: E = None
        self.w: H = None
        self.v: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: A = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: H = None
        self.x: I = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: D = None
        self.w: E = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: J = None
        self.q: F = None
        self.r: E = None
        self.w: H = None
        self.v: D = None
        self.txt = txt

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

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

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