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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: D = None
        self.z: F = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: C = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.z: C = None
        self.o: A = None
        self.v: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: D = None
        self.z: F = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: C = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.z: C = None
        self.o: A = None
        self.v: C = None
        self.p: B = None
        self.txt = txt

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

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