class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: C = None
        self.s: G = None
        self.p: G = None
        self.q: G = None
        self.v: G = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: I = None
        self.w: H = None
        self.x: D = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: A = None
        self.v: A = None
        self.s: B = None
        self.x: A = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: B = None
        self.q: E = None
        self.s: H = None
        self.u: F = None
        self.y: F = None
        self.p: H = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: I = None
        self.w: H = None
        self.x: D = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: A = None
        self.v: A = None
        self.s: B = None
        self.x: A = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: B = None
        self.q: E = None
        self.s: H = None
        self.u: F = None
        self.y: F = None
        self.p: H = None
        self.x: B = None
        self.txt = txt

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

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