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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: H = None
        self.q: D = None
        self.w: A = None
        self.v: F = None
        self.s: A = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: I = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: G = None
        self.r: B = None
        self.x: A = None
        self.u: I = None
        self.w: H = None
        self.z: A = None
        self.p: F = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.u: G = None
        self.s: A = None
        self.v: B = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: H = None
        self.q: D = None
        self.w: A = None
        self.v: F = None
        self.s: A = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: I = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: G = None
        self.r: B = None
        self.x: A = None
        self.u: I = None
        self.w: H = None
        self.z: A = None
        self.p: F = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.u: G = None
        self.s: A = None
        self.v: B = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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