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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: F = None
        self.o: I = None
        self.p: G = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: D = None
        self.o: G = None
        self.x: F = None
        self.t: J = None
        self.u: I = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.o: A = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: F = None
        self.o: I = None
        self.p: G = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: D = None
        self.o: G = None
        self.x: F = None
        self.t: J = None
        self.u: I = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.o: A = None
        self.v: A = None
        self.txt = txt

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

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

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

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