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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: A = None
        self.p: B = None
        self.q: F = None
        self.s: E = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: E = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: C = None
        self.s: J = None
        self.p: A = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: I = None
        self.z: I = None
        self.v: C = None
        self.o: G = None
        self.q: I = None
        self.p: H = None
        self.x: G = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: E = None
        self.o: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: E = None
        self.o: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: A = None
        self.p: B = None
        self.q: F = None
        self.s: E = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: E = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: C = None
        self.s: J = None
        self.p: A = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: I = None
        self.z: I = None
        self.v: C = None
        self.o: G = None
        self.q: I = None
        self.p: H = None
        self.x: G = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: E = None
        self.o: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: E = None
        self.o: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.z: E = None
        self.txt = txt

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

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