class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: C = None
        self.x: H = None
        self.u: G = None
        self.o: C = None
        self.r: D = None
        self.y: B = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: H = None
        self.w: I = None
        self.q: G = None
        self.y: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: F = None
        self.p: I = None
        self.s: A = None
        self.v: B = None
        self.z: I = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: I = None
        self.s: G = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: F = None
        self.q: D = None
        self.w: I = None
        self.o: B = None
        self.v: E = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: H = None
        self.w: I = None
        self.q: G = None
        self.y: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: F = None
        self.p: I = None
        self.s: A = None
        self.v: B = None
        self.z: I = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: I = None
        self.s: G = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: F = None
        self.q: D = None
        self.w: I = None
        self.o: B = None
        self.v: E = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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