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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: H = None
        self.r: F = None
        self.w: H = None
        self.o: G = None
        self.u: E = None
        self.t: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: H = None
        self.z: H = None
        self.p: H = None
        self.w: H = None
        self.y: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: E = None
        self.u: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: A = None
        self.z: A = None
        self.p: C = None
        self.y: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: H = None
        self.r: F = None
        self.w: H = None
        self.o: G = None
        self.u: E = None
        self.t: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: H = None
        self.z: H = None
        self.p: H = None
        self.w: H = None
        self.y: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: E = None
        self.u: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: A = None
        self.z: A = None
        self.p: C = None
        self.y: G = None
        self.txt = txt

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

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