class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: F = None
        self.w: D = None
        self.t: E = None
        self.p: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: H = None
        self.z: A = None
        self.u: C = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: I = None
        self.q: E = None
        self.s: G = None
        self.v: H = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: F = None
        self.x: C = None
        self.o: F = None
        self.s: C = None
        self.t: C = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: E = None
        self.z: E = None
        self.u: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: H = None
        self.z: A = None
        self.u: C = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: I = None
        self.q: E = None
        self.s: G = None
        self.v: H = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: F = None
        self.x: C = None
        self.o: F = None
        self.s: C = None
        self.t: C = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: E = None
        self.z: E = None
        self.u: G = None
        self.txt = txt

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

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