class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: I = None
        self.v: C = None
        self.w: E = None
        self.p: G = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: J = None
        self.p: F = None
        self.s: A = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: G = None
        self.q: A = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.o: B = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.s: A = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: A = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: F = None
        self.p: A = None
        self.z: A = None
        self.r: H = None
        self.x: C = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: I = None
        self.v: C = None
        self.w: E = None
        self.p: G = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: J = None
        self.p: F = None
        self.s: A = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: G = None
        self.q: A = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.o: B = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.s: A = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: A = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: F = None
        self.p: A = None
        self.z: A = None
        self.r: H = None
        self.x: C = None
        self.o: C = None
        self.txt = txt

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

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