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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: H = None
        self.q: C = None
        self.s: E = None
        self.w: F = None
        self.u: G = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

n = A("n")
k = B("k")
b = C("b")
h = D("h")
m = E("m")
f = F("f")
e = G("e")
g = H("g")
j = I("j")

n.w = g
n.p = k
n.v = m
k.z = j
k.t = g
k.q = b
k.s = m
k.w = f
k.u = e
k.y = n
b.o = e
h.t = b
h.o = e
m.w = b
m.u = j
m.t = k
m.o = e
f.o = j
f.w = e
f.y = m
f.u = b
e.q = m
e.z = m
g.o = f
g.y = b
g.p = k
j.x = n
assert k.z.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: H = None
        self.q: C = None
        self.s: E = None
        self.w: F = None
        self.u: G = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

n = A("n")
k = B("k")
b = C("b")
h = D("h")
m = E("m")
f = F("f")
e = G("e")
g = H("g")
j = I("j")

n.w = g
n.p = k
n.v = m
k.z = j
k.t = g
k.q = b
k.s = m
k.w = f
k.u = e
k.y = n
b.o = e
h.t = b
h.o = e
m.w = b
m.u = j
m.t = k
m.o = e
f.o = j
f.w = e
f.y = m
f.u = b
e.q = m
e.z = m
g.o = f
g.y = b
g.p = k
j.x = n
assert k.z.x.p.txt == "k"