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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: E = None
        self.q: G = None
        self.x: C = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: E = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: G = None
        self.u: F = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: A = None
        self.v: G = None
        self.p: B = None
        self.y: B = None
        self.o: B = None
        self.u: D = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: I = None
        self.r: E = None
        self.p: C = None
        self.z: E = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: G = None
        self.t: E = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: A = None
        self.v: B = None
        self.o: G = None
        self.z: G = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: E = None
        self.q: G = None
        self.x: C = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: E = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: G = None
        self.u: F = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: A = None
        self.v: G = None
        self.p: B = None
        self.y: B = None
        self.o: B = None
        self.u: D = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: I = None
        self.r: E = None
        self.p: C = None
        self.z: E = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: G = None
        self.t: E = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: A = None
        self.v: B = None
        self.o: G = None
        self.z: G = None
        self.y: B = None
        self.txt = txt

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

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