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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: D = None
        self.t: J = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: D = None
        self.v: C = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: I = None
        self.p: G = None
        self.y: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: D = None
        self.t: J = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: D = None
        self.v: C = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: I = None
        self.p: G = None
        self.y: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: B = None
        self.txt = txt

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

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