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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: D = None
        self.y: H = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: D = None
        self.y: H = None
        self.s: A = None
        self.txt = txt

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

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