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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: B = None
        self.o: F = None
        self.s: F = None
        self.x: B = None
        self.r: H = None
        self.z: F = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: B = None
        self.o: F = None
        self.s: F = None
        self.x: B = None
        self.r: H = None
        self.z: F = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.w: E = None
        self.txt = txt

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

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

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