class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: J = None
        self.s: I = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: I = None
        self.u: E = None
        self.w: H = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: A = None
        self.z: H = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: J = None
        self.u: J = None
        self.w: B = None
        self.r: F = None
        self.o: J = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: I = None
        self.u: E = None
        self.w: H = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: A = None
        self.z: H = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: J = None
        self.u: J = None
        self.w: B = None
        self.r: F = None
        self.o: J = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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