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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: H = None
        self.z: D = None
        self.w: D = None
        self.r: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: H = None
        self.z: D = None
        self.w: D = None
        self.r: D = None
        self.txt = txt

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

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