class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: I = None
        self.y: H = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: F = None
        self.o: H = None
        self.x: F = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: J = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: J = None
        self.v: C = None
        self.p: D = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: E = None
        self.x: I = None
        self.v: G = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: E = None
        self.w: J = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: F = None
        self.o: H = None
        self.x: F = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: J = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: J = None
        self.v: C = None
        self.p: D = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: E = None
        self.x: I = None
        self.v: G = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: E = None
        self.w: J = None
        self.txt = txt

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

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

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

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