class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: I = None
        self.o: I = None
        self.w: B = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: A = None
        self.w: E = None
        self.o: I = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: D = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: H = None
        self.u: E = None
        self.s: I = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: A = None
        self.w: E = None
        self.o: I = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: D = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: H = None
        self.u: E = None
        self.s: I = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.txt = txt

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

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

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