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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: I = None
        self.r: I = None
        self.y: J = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: A = None
        self.z: A = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: I = None
        self.r: I = None
        self.y: J = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: A = None
        self.z: A = None
        self.q: C = None
        self.txt = txt

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

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