class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: C = None
        self.t: H = None
        self.r: B = None
        self.y: H = None
        self.w: I = None
        self.q: D = None
        self.x: B = None
        self.u: C = None
        self.p: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: H = None
        self.z: J = None
        self.u: A = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: J = None
        self.y: D = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: A = None
        self.t: I = None
        self.z: J = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: D = None
        self.x: G = None
        self.y: C = None
        self.v: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: H = None
        self.z: J = None
        self.u: A = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: J = None
        self.y: D = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: A = None
        self.t: I = None
        self.z: J = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: D = None
        self.x: G = None
        self.y: C = None
        self.v: A = None
        self.txt = txt

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

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

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