class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: E = None
        self.s: H = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: E = None
        self.x: I = None
        self.w: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: G = None
        self.z: E = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: E = None
        self.q: A = None
        self.p: E = None
        self.r: D = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: E = None
        self.x: I = None
        self.w: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: G = None
        self.z: E = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: E = None
        self.q: A = None
        self.p: E = None
        self.r: D = None
        self.s: H = None
        self.txt = txt

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

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

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

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